~/talk

C++ WAT

Talkat CppCon 2015 · 2015-09-21..09-25· [c-and-cpp]

A rapid survey of concrete C++ gotchas showing code that compiles but does unexpected things: operator[] as pointer arithmetic makes a map look like an int; trigraphs and digraphs change string output; calling a destructor on an int expression is valid; realloc UB makes two pointers seem equal under clang; undefined behavior lets the optimizer replace table scans or infinite loops with constant returns; brace init turns vector<string> constructors into iterator overloads and can crash; a template trick makes a function impossible to call.

AI-written summary · about

  1. 0:00Intro
  2. 0:44Does it compile
  3. 1:28Code without comments
  4. 2:42Trycatch block
  5. 3:17Example
  6. 4:00Destructor
  7. 4:39Undefined behaviour
  8. 6:02Quantum language
  9. 6:34Function calls
  10. 7:03Undefined behavior
  11. 8:27Infinite loop
  12. 9:29Why does it compile
  13. 10:36GDB
  14. 11:12Braces
  15. 12:01Construct
  16. 12:56One minute more
~/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.