“Compile-time programming and reflection in C++20 and beyond”
summary
Roadmap for C++ compile-time programming: C++20 expands constexpr to allow allocation in constexpr, limited try/catch and virtual calls plus promotion of compile-time allocations into the data segment so std::vector and std::string can be constexpr; a new query API (Reflection TS) will present AST nodes as constexpr objects and use unreflexpr to materialize types; support functions that must evaluate at compile time via consteval/immediate functions and detect context with is_constant_evaluated; token-sequence injection for code generation is planned later.
AI-written summary · about
chapters (9)
- 0:00Introduction and motivation
- 1:05Why compile-time programming
- 10:17Expanding constexpr capabilities
- 23:44Challenges and limitations
- 33:25Immediate functions and evaluation
- 38:25Reflection API overview
- 48:55Code injection concepts
- 50:23Expected C++20 and beyond timeline
- 1:00:00Q&A session
related talks
01h 04mconstexpr: Introduction
01h 01mReflection
01h 03mOLD VERSION: Understanding The constexpr 2-Step
01h 08mReflections: Compile-time Introspection of Source Code
58mExploration of C++20 Meta Programming
01h 27mC++ Reflection - Back on Track
01h 01mExpressive Compile Time Parsers
01h 00mRemoving Metaprogramming From C++, Part 1 of N: constexpr Function Params
