C++: Unexpected Behaviour
summary
Lists concrete surprises: code snippets that let private method execute via base pointer, array indexing with literal first (5[a]), overload-resolution gotchas that hide base overloads and require using base::f, optimizer-driven changes where undefined behavior removes or alters code (uninitialized function pointer, signed overflow, redundant reads). Includes fixes (string literal s, wrapper lambdas, static_casts), compiler warnings and static analysis guidance, and slides with full examples and runnable snippets.
AI-written summary · about
chapters (12)
- 0:00Introduction to CPP
- 1:30Defining unexpected behavior
- 3:20C array behavior
- 4:56Encapsulation risks
- 8:17Operator usage and literals
- 12:20Overload resolution issues
- 14:19Inheritance and hiding
- 16:05Ternary operator quirk
- 17:10Compiler optimizations
- 21:42Guaranteed copy elision
- 23:57Preventing bugs
- 26:02Q&A session
related talks
01h 30m50 shades of C++
01h 10mAn Overview of C++11/14, Part II
01h 02mBack to Basics - Name Lookup and Overload Resolution in C++
01h 02mEmbedded Friendly C++: Features That Make a Difference
44mThis is why we can('t) have nice things
15mC++ Puzzlers
01h 05mC++11 in the Wild: Techniques from a Real Codebase
01h 05mBack To Basics: Overload Resolution
