Cute C++ Tricks, Part 2 of N: More code you should learn from and never write
summary
Shows concrete C++ gotchas: using assert in constexpr to force compile-time failures where static_assert won't work, why constexpr functions can be ill-formed yet compile (the IFNDR (ill-formed no diagnostic required) corner), and a runnable registry hack that stores values in a static during a throwing initializer and later reconstructs a Lambda type with decltype to access that storage. Covers the exact code patterns, compiler warnings produced, and a real failure mode when moving Lambdas to a GPU.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:14Talk objectives and disclaimers
- 4:46Assert in constexpr
- 13:17Constexpr functions
- 21:53Spooky static storage
- 29:19Questions and conclusion
related talks
56mCute C++ Tricks (and what you can learn from them): Part 2 of N
59mModern C++ for Fun and Profit: This isn’t your old C++
15mC++ WAT
01h 01mEasy to Use, Hard to Misuse: Declarative Style in C++
52mNon-conforming C++: the Secrets the Committee Is Hiding From You
51mModern techniques for keeping your code dry
56mC++ Lambda Idioms
54mC++ Common Knowledge
