“Meta: Thoughts on generative C++”
summary
Two years of proposals boil down to concrete design sketches and a working prototype that demonstrate naming class categories and generating code at compile time. Metaclasses let a single opt-in word enforce defaults, inject constructors and comparisons, and reject forbidden members; a three-way comparison cuts ~18 operator overloads to two; compile-time work uses constexpr blocks and reflection plus constexpr injection to emit definitions while keeping runtime cost zero; a Clang prototype on godbolt.org shows generated output for debugging.
AI-written summary · about
chapters (10)
- 0:00Introduction and welcome
- 2:28Spaceship operator proposal
- 5:23Simplifying C++ with new features
- 10:28Foundation for generative C++
- 16:40Reflection in C++
- 18:30Compile-time code expansion
- 26:26Abstractions and tool support
- 34:17Metaclasses overview
- 51:54Metaclass examples and benefits
- 1:31:18Q&A session
related talks
59mMeta++: Language Support for Advanced Generative Programming
01h 11mThoughts on Metaclasses - Herb Sutter
01h 39m“Thoughts on a more powerful and simpler C++ (5 of N)”
01h 01m“How bad is Meta-Programming still today?"
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
01h 00mDynamic Polymorphism with Metaclasses and Code Injection
06mCode Generation: The Lisp Way
01h 39m“Concepts: The Future of Generic Programming (the future is here)”
