C++ Features You Might Not Know
summary
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
chapters (29)
- 0:00Talk introduction
- 1:10Plus operator conversions
- 3:37Comma operator tricks
- 5:00C++20 operator overloading
- 7:26Arrow operator overloading
- 8:50Scope exit with operators
- 10:33If-else statement internals
- 11:58Enum in switch statements
- 13:49Switch-case tricks
- 14:54Floating-point rounding
- 17:01Floating-point exceptions
- 19:30East const vs west const and declaration specifiers
- 21:15C declaration quirks
- 23:46Function pointer syntax
- 25:30Conversion operator limits
- 26:57Function call conversions
- 27:40Static function variables
- 29:05Try-block in main
- 29:25Struct vs class templates
- 31:33Dynamic cast tricks
- 33:38Union padding tricks
- 36:05Objects without constructors
- 37:07Valarray forgotten features
- 38:33Exception string types
- 39:58Long jump exceptions
- 41:41Undefined integer behavior
- 45:12C++ quiz operator precedence
- 47:49Modulo behavior comparison
- 52:04Summary
related talks
51mC++ Features You Might Not Know
15mC++ WAT
52mNon-conforming C++: the Secrets the Committee Is Hiding From You
17mC++ Cryptozoology - A Compendium of Cryptic Characters
01h 19mThis is C++: Uncompromised Performance, Undefined Behavior, & Move Semantics
52mC++ Puzzlers
30mC++ Cryptozoology - A Compendium of Cryptic Characters :: #2
54mTypical C++, But Why?
