~/talk

Implicit Conversions Considered Harmful

Talkat NDC TechTown 2025 · 2025-09-22..09-25· [security, rust]
slides:none on file

Implicit conversions create surprising behavior and hidden costs: converting string literals to std::string makes temporaries and extra copies, pair-to-pair and tuple-like conversions silently copy and rewrap std::function causing heap allocs and a measured 10x slowdown in a QuickBench microbenchmark, moving into const smart pointers materializes temporaries and forces extra refcount increments on shared_ptr. Tools sometimes help — GCC warning "loop variable binds to temporary" or clang-tidy checks catch common cases, Visual Studio emits other warnings, and perf with call-graph tracing or Cachegrind exposes where implicit conversions inflate call counts.

AI-written summary · about

  1. 0:00Welcome
  2. 3:21Implicit conversions tools miss
  3. 10:48Code review of PR
  4. 18:16Historical context advice
  5. 22:54C++11 library features
  6. 26:50Tuple and pair conversions
  7. 31:34Unique pointer issues
  8. 36:17Shared pointer overhead
  9. 42:23Variant and optional conversions
  10. 43:25String views undefined behavior
  11. 45:54C++20 and C++23 additions
  12. 48:00Complex conversion chains
  13. 51:17Performance impact
  14. 52:22Finding conversion costs
  15. 55:39AI tools fail to detect
  16. 56:45Best practices
  17. 59:57Future solutions and proposal
  18. 1:00:20Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.