Implementing C++ Reflection Using the New C++20 Tooling Opportunity: Modules
Talkat CppCon 2024 · on Friday, 2024-09-20· at 10:30· Spruce 3/4, 6700 North Gaylord Rockies Boulevard·
summary
Claims a working runtime reflection pipeline that reads Microsoft .ifc Binary Module Interface files (open IFC spec) to generate metadata, avoiding slow source parsing and manual registration. Implements a generator (library named need_reflection), integrates via a separate build target or compiler-wrapper and CMake, and produces fast reflection info that mostly works. Limits: requires C++ modules, loses some template instantiation and custom user-attributes, and needs extra work for header-only or cross-compiler cases.
AI-written summary · about
chapters (17)
- 0:00Welcome
- 2:36What reflection is
- 6:11Reflection use cases
- 9:21Runtime reflection overview
- 13:37Gathering type info
- 18:33Compilation model limits
- 20:39Modules change compilation
- 24:31Parsing BMI files
- 29:45Need Reflection library
- 35:04Bespoke reflection solution
- 36:27Field abstraction with pointers
- 41:44Method invocation techniques
- 43:09Full reflection features
- 45:14Template type ID trick
- 47:23Handling inheritance
- 51:41Summary
- 52:01Q&A
related talks
01h 09mC++ Modules: Getting Started Today
01h 04mC++ Modules - Getting started today
01h 01mC++ Modules and Large-Scale Development (Part 1)
01h 00mSo, you want to use C++ Modules ... cross-platform?
01h 02mModern CMake Modules
01h 17mThe Importance of the C++ Build System Target Model
55mModern CMake for modular design
01h 13mC++ Modules and Large-Scale Development (Part 2)
