Expression Templates: Past, Present, Future
summary
Covers practical limits and fixes for expression templates: shows that automatic type deduction causes wrong types and duplicated work for expressions, that storing subexpressions by reference leads to dangling references and release-mode crashes, and that deep_copy fixes correctness at high runtime cost. Uses Boost.Proto and a hand-rolled DSL that computes symbolic derivatives and a simplifier at compile time, with working code on GitHub. Proposes C++14 polymorphic lambdas to compress symbol names and a storage policy using move/decay; prototype reports 2–3x faster compile times in many cases.
AI-written summary · about
chapters (9)
- 0:00Tree Custom Transform
- 1:39Automatic type deduction
- 6:26The Sub expression issue
- 10:22Compilation time
- 25:33Expression Templates in C++11/14
- 27:14auto and Expression templates
- 29:01The shiki library
- 42:07Let's go radical
- 44:09Expression Templates ? Really!
related talks
01h 06mResolving Template MetaProgramming Challenges Using Type_expr
01h 01mRethinking the Way We Do Templates in C++
58mExploration of C++20 Meta Programming
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 01m“How bad is Meta-Programming still today?"
57mIntroduction to C++ Template Metaprogramming
01h 02mCrafting EDSL In C++ using Metaprogramming, Operator Overloading, & Lambda Expressions
01h 13mC++ Templates Revised
