Rethinking the Way We Do Templates in C++
summary
Library implements a physical-units system that keeps debuggable, human-readable types by deriving user-facing strong types from heavy template instantiations via a downcast CRTP trick, replaces class-template-heavy ratios with non-type template parameters (string and ratio values) and uses concepts instead of SFINAE to constrain interfaces. Benchmarks with metabench show NTTP/value-based designs cut compile time from tens of seconds to a few seconds in hotspot tests and concepts compile faster than complex SFINAE on modern compilers.
AI-written summary · about
chapters (12)
- 0:00Start
- 1:44The User Experience
- 2:32What the Physical Units Library Does
- 27:17Donecast Implementation
- 32:09Non-Type Template Parameters
- 36:16Template Argument Equivalent
- 43:08What Are Concepts Class Function
- 55:16Benefits of Using Concepts
- 1:02:07Parameter Kinds
- 1:08:36Performance
- 1:18:03Performance Outcome
- 1:20:52What Is the Performance of Concepts
related talks
01h 37mRethinking the Way We Do Templates in C++ even more
01h 01mRethinking the Way We Do Templates in C++
01h 10mThe C++ Type System Is Your Friend
57mIntroduction to C++ Template Metaprogramming
47mReducing Template Compilation Overhead, Using C++11, 14, 17, and 20.
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 21mWhat Has C++20 Ever Done For Templates?
01h 23mThe Power of C++ Templates With mp-units: Lessons Learned & a New Library Design
