“Template Normal Programming (part 1 of 2)”
summary
Covers practical rules and gotchas for everyday C++ templates: how to use and test templates with __PRETTY_FUNCTION__, when to prefer variable templates or alias templates, and why alias templates cannot be specialized. Shows concrete fixes: explicitly supply template arguments or stop a parameter from participating in deduction (avoids the std::max error), use + to convert a lambda to a function pointer, and explains reference collapsing/forwarding references so you know what T deduces to and when implicit conversions fail.
AI-written summary · about
chapters (7)
- 0:00Introduction to templates
- 9:20Kinds of templates
- 14:52Template type deduction
- 22:19Advanced deduction rules
- 28:22References and collapsing
- 45:46Template specialization
- 52:30Specialization constraints
related talks
57mIntroduction to C++ Template Metaprogramming
01h 03mBack to Basics: Templates (part 2 of 2)
01h 06m“C++ Metaprogramming: Journey from simple to insanity and back"
01h 05mBack to Basics: Templates (part 1 of 2)
01h 04mClass Template Argument Deduction in C++17
01h 00mModern Template Metaprogramming: A Compendium, Part I
01h 37mRethinking the Way We Do Templates in C++ even more
01h 27mC++20 Templates - the Next Level: Concepts and More
