C++ Reflection: Back on Track
summary
Claims that compile-time reflection is on track for C++26 and that P2996 proposal focuses on nearly complete introspection with minimal code injection, demonstrated by working prototypes, decide whether to watch. Examples include a generic command-line parser, automatic serialization, and a struct-of-arrays generator built with meta functions like substitute and define_aggregate plus splicers `[: :]` and the double caret operator. Two and a half experimental implementations run on Compiler Explorer (EDG, Bloomberg clang fork, Nvidia front end) and mostly work but remain buggy and non-production.
AI-written summary · about
chapters (12)
- 0:00Introduction to reflection
- 1:14Defining reflection concepts
- 2:09Compile-time vs runtime
- 6:49Reflection in other languages
- 10:36Current C++ capabilities
- 14:31Reflection TS review
- 17:25The C++26 reflection proposal
- 34:31Practical reflection examples
- 44:49Experimental implementations
- 47:18Serialization with reflection
- 50:15Future directions and extensions
- 56:47Conclusion and Q&A
related talks
01h 21mGazing Beyond Reflection for C++26
01h 05mC++ Reflection Based Libraries to Look Forward To
01h 37mPeering Forward - C++’s Next Decade
40mReflection in C++ Next
45mBetter C++14 reflections
57mBuilding a C++ Reflection System
58mWriting a reflection engine from scratch
39mReflection without Reflection TS
