~/talk

C++ Features You Might Not Know

Talkat NDC TechTown 2023 · 2023-09-18..09-21· [c-and-cpp]
links:none on file
slides:none on file

Covers concrete surprises: a[b] == b[a] and why raw-array indexing is commutative; how unary + performs integral promotion, triggers pointer decay and unary + converts lambda to function pointer for template args; using the comma operator to expand packs with guaranteed order; overloading odd operators (comma, operator->*), the scope-exit macro built from an overloaded operator, and packing a tagged union via the common initial sequence to drop padding. Also explains NaN payloads for NaN-boxing, INT_MIN / -1 UB, and why modulo with negatives differs across languages.

AI-written summary · about

  1. 0:00Talk introduction
  2. 1:10Plus operator conversions
  3. 3:37Comma operator tricks
  4. 5:00C++20 operator overloading
  5. 7:26Arrow operator overloading
  6. 8:50Scope exit with operators
  7. 10:33If-else statement internals
  8. 11:58Enum in switch statements
  9. 13:49Switch-case tricks
  10. 14:54Floating-point rounding
  11. 17:01Floating-point exceptions
  12. 19:30East const vs west const and declaration specifiers
  13. 21:15C declaration quirks
  14. 23:46Function pointer syntax
  15. 25:30Conversion operator limits
  16. 26:57Function call conversions
  17. 27:40Static function variables
  18. 29:05Try-block in main
  19. 29:25Struct vs class templates
  20. 31:33Dynamic cast tricks
  21. 33:38Union padding tricks
  22. 36:05Objects without constructors
  23. 37:07Valarray forgotten features
  24. 38:33Exception string types
  25. 39:58Long jump exceptions
  26. 41:41Undefined integer behavior
  27. 45:12C++ quiz operator precedence
  28. 47:49Modulo behavior comparison
  29. 52:04Summary
~/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.