Reflection in C++ - Past, Present, and Hopeful Future
summary
Claim: C++ gains usable compile‑time reflection that turns types into manipulable values and back, enabling concrete features: std::meta value APIs, a template‑for iterator that must not introduce a new scope, and algorithm‑selection that emits either switch or cascaded ifs. Examples built include a tainted string wrapper (700 lines avoided), a traced container that forwards every method, and grammar‑to‑parser generation; limitations shown are scope introduced by if consteval and missing insertion/compile‑time code emission addressed by proposal P1240.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 2:43What is reflection
- 5:05Design by reflection
- 9:03Million Lines of Code Challenge
- 13:41Templates
- 16:49String Types
- 18:35Constructors
- 20:29The Verdict
- 23:22Container adapters
- 24:29Container independent code
- 24:59Powerset interfaces
- 31:29History of Reflection
- 36:01Static Reflection
- 43:37D Reflection Applications
- 46:10Code Example
- 46:24Language Changes
- 48:53Example
- 53:01Runtime Switch
- 54:21Algorithm Selection
- 58:34STD Meta
related talks
09mFinal Thoughts
01h 09mRecent Concurrency and Parallelism Proposals to the C++ Standard Committee
01h 06mEndnote: AI-Assisted Software Engineering
39mFireside on making a typed language on the BEAM
05mLightning Talk: Memoizing Constexpr Programs
43mPower of collective intelligence
27mThe Many Ends of Programming
35mProof Theory Impressionism: Blurring the Curry-Howard Line
