~/talk

C++ Reflection: Back on Track

Talkat CppNorth 2024 Β· 2024-07-21..07-24Β· [c-and-cpp]
links:none on file
slides:none on file

Proposal P2996 adds compile-time reflection to C++ with a single opaque type meta::info, a prefix ^ operator for reflection and [::] splices to turn reflections back into code; language wording is design-approved and the library is under review aiming for C++26. Implementations exist on Compiler Explorer (EDG, clang experimental and NVIDIA NVC++). Concrete demos compile: a generic command-line parser, automatic struct->SoA conversion, allocator propagation via substitute/Define_class, and near‑automatic serialization.

AI-written summary Β· about

  1. 0:00Introduction to C++ reflection
  2. 1:33What is reflection?
  3. 7:30Reflection in other languages
  4. 15:20Past C++ reflection attempts
  5. 18:34P2996 reflection proposal
  6. 29:42Meta functions in P2996
  7. 39:19Compile-time loops for reflection
  8. 41:26Real-world example: parse options
  9. 42:50Code injection: substitute function
  10. 46:42Code injection: Define class
  11. 49:10Trying reflection today
  12. 51:17Serialization with reflection
  13. 53:22Token sequences and Q injection
  14. 59:50Future directions for reflection
  15. 1:02:24Summary and takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.