Modern Template Techniques
summary
Shows concrete recipes and why they matter: implements an add template using trailing return + decltype and then simplifies with auto; chooses memcpy vs std::copy by detecting std::is_trivially_copyable with enable_if vs constexpr if and tag dispatch for optimal complexity; builds a timing wrapper that uses perfect forwarding (forwarding references + parameter packs and std::forward) to wrap any call, compile-time discards unused branches, and accumulates elapsed time successfully.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:52Template Challenge
- 7:03Type Traits
- 9:28Type Functions
- 15:08Compile-time Conditional Overloading
- 24:35Constexpr Conditional
- 28:30Policy Classes
- 35:27Perfect Forwarding
- 49:36The Standard
- 52:00Compiler
related talks
01h 07mBack to Basics: Templates (part 2 of 2)
41mTemplate meta-programming: Why you must get it
01h 02mBack to Basics: Templates in C++
59mModern Template Metaprogramming: A Compendium, Part II
01h 38mMake Simple Tasks Simple!
59mCombining C++17 Features
56mboost.tmp: your DSL for Metaprogramming
40mAn inspiring introduction into Template Meta Programming
