A new look at TMP
summary
Argues that TMP remains useful mainly for type-level programming and demonstrates concrete techniques: writing meta-functions as using-alias meta-functions, falling back from nested value_type to iterator-based decay/remove_cvref, and implementing predicate checks with void_t detection idiom and template-template higher‑order metafunctions. Provides a working C++17 detector implementation, shows how to define sum overloads chosen by requires/detection, and notes that some concept-based examples fail on current GCC/MSVC despite working with clang or in experimental namespaces.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:24Disclaimer
- 2:01Meta-programming
- 2:39Meta-functions
- 4:53Terse syntax
- 7:01General syntax
- 9:36Terse accessors
- 13:26Deducing types
- 15:21Writing out the exact types
- 18:23Duck-oriented programming
- 23:57Back to the drawing board
- 24:55The void
- 25:33Discarding overloads
- 26:03Detecting nested types
- 28:03Adding more constraints
- 30:19The detector backend
- 32:11Detection
- 38:02Questions
related talks
40mAn inspiring introduction into Template Meta Programming
41mTemplate meta-programming: Why you must get it
59mModern Template Metaprogramming: A Compendium, Part II
53mFrom C++ Templates to C++ Concepts - Metaprogramming: an Amazing Journey
55mHow bad is meta-programming still today?
01h 10mThe Three Little Dots and the Big Bad Lambdas
49mA Journey Into Non-Virtual Polymorphism in C++
59mTemplate Metaprogramming: Type Traits (part 2 of 2)
