Exploration of C++20 Meta Programming
summary
Concrete C++20 features and effects: concepts and new type_traits (notably is_constant_evaluated) move logic to compile time and make constraints readable; using constraints as template-parameter requirements versus trailing requires changes when the compiler rejects candidates and can reduce compile time — constraint evaluation order matters. For lazy computation prefer expression proxies or classic expression templates; ranges would simplify many cases but the missing zip_with view forces heavier templates today. Examples show code, compile-time counts, and measurable compiler-time wins.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker background
- 3:24What are C++20 templates
- 9:47Adding templates to existing code
- 13:01Overload resolution and ADL
- 15:53Compile-time conditions before C++20
- 23:33Compile-time conditions with C++20
- 33:21Real-world use case with concepts
- 37:43Advanced compile-time logic methods
- 47:05Constraints evaluation performance
- 50:45Key takeaways and resources
related talks
54mC++ Concepts for Developers
01h 01m“How bad is Meta-Programming still today?"
01h 00mRemoving Metaprogramming From C++, Part 1 of N: constexpr Function Params
01h 00mConcepts in C++20: Revolution or Evolution
01h 21mWhat Has C++20 Ever Done For Templates?
01h 39m“Concepts: The Future of Generic Programming (the future is here)”
57mIntroduction to C++ Template Metaprogramming
59mMetaprogramming: From Templates to Concepts
