Metaprogramming in C++14
summary
Uses C++14 and Boost.Hana to represent types, integers and strings as values and builds concrete examples: a parser combinator that returns tuple results, an event system keyed by compile-time strings with a runtime fallback, and dimensional-analysis quantities using compile-time integers. Implements user literals _c and _s to lift values into types, catches wrong-event and unit mismatches with static_assert, and reports benchmarks (tens of millions of triggers) showing performance close to hand-written code.
AI-written summary · about
chapters (11)
- 0:00Introduction to metaprogramming
- 1:14History of C++ metaprogramming
- 7:18Classic metaprogramming with MPL
- 12:18Boost Fusion and runtime objects
- 17:38Modern metaprogramming with Hana
- 25:06Parser combinators with Hana
- 35:52Dimensional analysis example
- 58:40Compile-time event system
- 1:17:50Future of metaprogramming
- 1:29:30Metaprogramming in C++17 and beyond
- 1:33:00Q&A and closing
related talks
01h 08mC++ Metaprogramming: A Paradigm Shift
05mPostmodern Meta C++
51mC++: How I learned to stop worrying and love metaprogramming
58mExploration of C++20 Meta Programming
57mIntroduction to C++ Template Metaprogramming
51mThe C++ Type System is your Friend
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 06m“C++ Metaprogramming: Journey from simple to insanity and back"
