Keynote - C++ Metaprogramming: evolution and future direction
summary
History of template metaprogramming leads to a concrete claim: representing compile-time entities as ordinary values (using Boost.Hana) lets code use normal operators, user-defined literals for compile-time strings, and treat types as objects. A worked example builds an event system with a compile-time map vs runtime unordered_map, measures up to 10 million triggers and finds negligible runtime overhead while enabling compile-time membership errors and faster lookup; a clang branch demonstrates reflection-based JSON serialization in two slides.
AI-written summary · about
chapters (18)
- 0:00Start
- 0:44How Did Meta Programming Appear
- 4:54Modern C + + Design
- 13:13Implement a Parser
- 14:09The Basic Parser
- 19:44Integral Constants
- 20:28Meta Function
- 29:30Strings
- 34:29Hana
- 38:39Implementing a Simple Event System
- 1:02:30Lateral Operator Template
- 1:08:23Reflection
- 1:08:40Serialization
- 1:13:11Printing User-Defined Types
- 1:19:39Meta Programming Is Very Powerful
- 1:23:25Benchmarks
- 1:26:40Questions from the Middle
- 1:35:22Stateful Meta Programming Example
related talks
41mTemplate meta-programming: Why you must get it
59mModern Template Metaprogramming: A Compendium, Part II
23mFunctional Programming in C++ (Run time vs Compile time types)
01h 03mMeta Techniques: Heterogeneous Polymorphism & Fast Prototyping at Facebook
56mboost.tmp: your DSL for Metaprogramming
02h 02mPeering forward: C++'s next decade
05mLightning Talk: MP: Template Meta-Programming in C++
40mAn inspiring introduction into Template Meta Programming
