C++: How I learned to stop worrying and love metaprogramming
summary
Describes a production database (quasardb) built since 2008 using real template metaprogramming to reduce bugs and maintenance while improving speed, claiming zero runtime overhead by doing checks and code generation at compile time. Shows concrete tools: C++11 variadic templates, Boost.Fusion and Spirit X3, a tiny library called Brion, and MSVC/Clang/GCC cross‑platform builds. Demonstrates compile‑time factorials, type lists, variant‑based command dispatch with static_assert registration, and warns about higher compiler memory and 2GB limits on old toolchains.
AI-written summary · about
chapters (13)
- 0:00Introduction and background
- 1:07First contact with metaprogramming
- 4:39Why metaprogramming matters
- 10:02Metaprogramming vs. regular programming
- 14:17Brion library introduction
- 15:01Compile-time vs. runtime concepts
- 24:27Simple template metaprogramming example
- 27:41Advanced type manipulation
- 29:31Improving command patterns
- 33:25Serialization with metaprogramming
- 38:25Pros, cons and tips
- 41:15Getting started with metaprogramming
- 46:29Q&A
related talks
57mIntroduction to C++ Template Metaprogramming
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 01m“How bad is Meta-Programming still today?"
01h 34mMetaprogramming in C++14
01h 01mRethinking the Way We Do Templates in C++
01h 30mRethinking the Way We Do Templates in C++
01h 48m“Meta: Thoughts on generative C++”
01h 39m“Thoughts on a more powerful and simpler C++ (5 of N)”
