“Template Normal Programming (part 2 of 2)"
summary
Explains how to get real-world template code to behave: implement partially specialized function behavior by delegating to a class-template is_pointer_impl; move full specializations out of headers using extern template / template (explicit instantiation) so reverse<utf8> can be defined in a .cpp; use tag dispatch + iter_traits with true_type/false_type for fast vs generic iterator advance; warns about instantiation rules, static_assert firing only when needed, linker fragility, and C++17 features like class template argument deduction and deduction guides.
AI-written summary · about
chapters (25)
- 0:00Partial specialization
- 1:28Translation units
- 4:26Explicit instantiation
- 6:11Class template members
- 8:21Name mangling risks
- 10:42Refresher and Q&A
- 12:17Template idioms
- 15:25Type traits
- 17:31Keyword typename
- 22:54Traits classes
- 25:17ODR usage
- 28:24Linker behavior
- 30:37Instantiation rules
- 32:47Static assert
- 34:26Lazy instantiation
- 37:32Variable templates
- 38:31Variadic deduction
- 41:33Pack expansion
- 43:55Parameter packs
- 45:41Deduction edge cases
- 49:45C++11 features
- 50:45Template auto
- 52:39Class deduction
- 55:43Deduction guides
- 57:47Advanced guides
related talks
57mIntroduction to C++ Template Metaprogramming
01h 03mBack to Basics: Templates (part 2 of 2)
01h 37mRethinking the Way We Do Templates in C++ even more
01h 04mClass Template Argument Deduction in C++17
01h 06m“C++ Metaprogramming: Journey from simple to insanity and back"
01h 30mRethinking the Way We Do Templates in C++
54mGeneric Programming Without (Writing Your Own) Templates
12mTraits Go Mainstream...
