C++ Metaprogramming: A Paradigm Shift
summary
Argues that C++14 lets metaprogramming use normal C++ syntax and builds a single library that replaces MPL and Fusion, showing a working Boost library Hana with ~80 algorithms, eager heterogeneous tuples, and a compile-time string type for struct keys (compile-time strings). Demonstrates: integral-constant objects enabling operator-based compile-time arithmetic and loop unrolling (integral constants), tuple algorithms like transform/filter implemented with index sequences, and measured improvements in compile and include times.
AI-written summary · about
chapters (49)
- 0:00Introduction
- 0:31Types of computations
- 0:53Ntime computations
- 2:02Runtime world
- 2:31Algorithms
- 2:57Heterogenous Computation
- 3:19Template Functions
- 5:07Typelevel computations
- 5:32Typelevel functions
- 6:00Heterogeneous computations
- 6:37C14 changes everything
- 7:10Im biased
- 7:26Exit Tax
- 8:02Detection idiom
- 8:48Detection lambda
- 9:19introspection
- 10:57remote
- 11:16serializing
- 12:10base types
- 12:44userdefined types
- 13:21cute examples
- 13:34messages
- 14:37compile times
- 16:11rethink metaprogramming
- 16:42integral constant
- 18:31integral constant objects
- 21:07implicit conversion
- 21:40variable templates
- 22:02userdefined literal
- 23:58realworld example
- 24:22normal operators
- 24:40auto
- 25:35runtime values
- 26:27loop unrolling
- 27:21operator bracket
- 28:10ratio
- 29:01type threads
- 29:27functions
- 30:50why
- 31:37filter
- 32:51single library
- 33:34a domainspecific language
- 35:32compiletime maps
- 36:35case study
- 37:21make it simple
- 37:40default
- 38:08switch
- 41:21processing cases
- 46:54Sebastian Riddle
related talks
01h 34mMetaprogramming in C++14
53mMulti-Paradigm Programming and Beyond
05mPostmodern Meta C++
57mIntroduction to C++ Template Metaprogramming
01h 31mFunctional Programming in Modern C++: The Imperatives Must Go!
59mModern C++ for Fun and Profit: This isn’t your old C++
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 35mC++20 – My Favourite Code Examples
