Templates Made Easy with C++20
summary
Claims that C++20 concepts plus constexpr/consteval and fold expressions let template code read like normal code, remove much SFINAE and heavy type-trait plumbing, and produce clearer compile‑time errors. Demonstrations use production GUI and DSP examples: an in‑place processor wrapper, optional reset implemented with the if consteval trick, and a properties system replacing verbose metaprogramming. Notes practical limits: recursion depth hits for consteval Fibonacci (compiler flags matter) and occasional performance surprises across compilers.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 5:14Templates to C++20 constexpr
- 15:50Understanding C++20 concepts
- 25:21Requires expression mistakes
- 33:01Documenting APIs with concepts
- 46:43Test-driven development for concepts
- 50:17Conclusion
related talks
01h 11mC++20 Templates: The next level: Concepts and more
06mLightning Talk: C++20 - A New Way of Meta-Programming?
07mLightning Talk: Higher-Order Template Metaprogramming with C++23
01h 03mTemplate-less Metaprogramming in C++
01h 05mYour New Mental Model of constexpr
01h 03mTemplate Metaprogramming: Practical Application
01h 01mBack to Basics: Concepts in C++
01h 01mBack to Basics: Templates (part 1 of 2)
