Reflection Techniques in C++
summary
Survey of concrete techniques: uses Boost.Fusion and Boost.Hana to adapt structs, get member names, zip names with values and produce XML; builds a prototype ORM that emits CREATE TABLE SQL with max-length and primary-key annotations and type-to-SQL mapping via simple traits; shows a visitor pattern with attribute search to select only primary-key fields; supplies a DIY reflectable macro that generates a left-to-right for_each using initializer-list expansion. All examples compile and code is posted (conference repo / GitLab).
AI-written summary · about
chapters (10)
- 0:00Introduction to reflection
- 1:45Compile-time reflection focus
- 2:49Uses of reflection techniques
- 5:44Boost Fusion technique
- 12:31Associative sequences in Boost Fusion
- 15:42Adding attributes to fields
- 22:28Visitor pattern for reflection
- 29:17Selective visitation with attributes
- 33:05DIY reflection macro
- 41:23Summary and Q&A
related talks
36mCompile-time reflection, Serialization and ORM
01h 10mReflection Is Good for C++ Code Health
42mC++ Horizons
01h 01mReflection
01h 34mKeynote: Reflection Is Only Half the Story
46mBuilding a C++ Reflection System in One Weekend Using Clang and LLVM
01h 08mReflections: Compile-time Introspection of Source Code
56mExploring Dependency Injection and Reflection in Modern C++
