C++ Puzzlers
summary
Shows concrete C++ footguns: how the lexer’s maximal munch turns a++ + ++b into a compilation error (post‑increment applied to an rvalue), how overload choice for an operator on an incomplete type is unspecified across GCC/Clang/MSVC, how specializing std traits (std::is_signed / numeric_limits) broke CI when MSVC changed, why volatile a + a is undefined behavior (unsequenced side effects), and how std::async futures behave: temporaries block on destruction while std::async deferred never runs unless waited on. Tools and evidence: PVS‑Studio, Godbolt compiler tests, and live compiler comparisons.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:05Introduction
- 5:55How It Will Be Parsed in the End
- 9:01Maximal Munch Principle
- 11:49Templates
- 18:17Static Analyzer
- 22:40Why Are My Tests Failing
- 33:09Volatile Variable
related talks
15mC++ WAT
30mC++ Cryptozoology - A Compendium of Cryptic Characters :: #2
01h 27mDangerous Optimizations! in C++ - Part Deux
53mC++ Features You Might Not Know
57mC++ MythBusters Strike 2
29mC++ Cryptozoology - A Compendium of Cryptic Characters
17mC++ Cryptozoology - A Compendium of Cryptic Characters
59mModern C++ for Fun and Profit: This isn’t your old C++
