C++ Reflection - Back on Track
summary
Proposal P2996 gives compile‑time reflection with a single opaque meta type (std::meta_info), a prefix ^ operator for reflection, consteval meta functions to query members and types, and a code‑injection mechanism using splice [::] plus helper functions substitute and define_class. Examples compile on experimental EDG, Clang fork and NVIDIA NVHPC compilers and show real features: auto fill of a command‑line options struct, enum→string, automatic serialization and struct‑of‑arrays generation; implementations exist but remain preliminary.
AI-written summary · about
chapters (7)
- 0:00Introduction to reflection
- 23:23Proposal P2996 fundamentals
- 35:42Splicers and operators
- 40:43Metafunctions and querying
- 50:44Practical coding examples
- 56:03Advanced injection techniques
- 1:10:23Serialization and future outlook
related talks
01h 04mWelcome to v1.0 of the meta::[[verse]]!
01h 01mReflection
01h 08mReflections: Compile-time Introspection of Source Code
55mC++14 Reflections Without Macros, Markup nor External Tooling..
59mMeta++: Language Support for Advanced Generative Programming
36mCompile-time reflection, Serialization and ORM
01h 18mReflection API for Modern C++
42mC++ Horizons
