- Introduction and overview
- Argument deduction
- Concepts
- Function templates
- Parsing and compilation
- Policies
- Specialization
- Tuples
- Type lists
- Type traits
🔗
- Templates – C++ FAQ
🎥
- H.Matthews. The C++ type system is your friend – ACCU (2017)
- W.E.Brown. Modern template metaprogramming: A compendium. Part I, Part II – CppCon (2014)
- A.Modell. C++ advanced topics in templates – Tech Talk (2014)
- M.Caisse. Introduction to modern C++ techniques. Part I, Part II – C++Now (2012)
📖
- D.Vandevoorde, N.M.Josuttis, D.Gregor. C++ templates: The complete guide – Addison-Wesley Professional (2017)
- A.Alexandrescu. Modern C++ design: Generic programming and design patterns applied – Addison-Wesley Professional (2001)
🔗
- Template argument deduction – C++ reference
🎥
- S.Meyers. Type deduction and why you care – CppCon (2014)
🔗
- How will concepts lite interact with universal references? – Stack Overflow
🎥
- B.Stroustrup. Concepts: The future of generic programming (the future is here) – CppCon (2018)
⚓
- W.E.Brown.
enable_ifvs.requires: A case study – WG21/P0552R0 (2017)
🔗
- Necessity of forward-declaring template functions – Stack Overflow
- H.Sutter. Why not specialize function templates?
🔗
- Why do I get linker errors when I use template friends? – C++ FAQ
- Correct syntax for friend template function – Stack Overflow
🔗
- L.Dionne. Efficient parameter pack indexing (2015)
- A.Bergé. True story: Efficient packing (2015)
🎥
- J.Brown. Reducing template compilation overhead, using C++11, 14, 17, and 20 – CppCon (2019)
Names are resolved in two steps: first, non-dependent names are resolved at the time of template definition and, second, dependent names are resolved at the time of template instantiation.
🔗
- T.Gani et al. Two-phase name lookup support comes to MSVC – Microsoft C++ team blog (2017)
- Two-phase lookup in C++ templates (2014)
- E.Bendersky. Dependent name lookup for C++ templates (2012)
- Why do I have to access template base class members through the
thispointer? – Stack Overflow
struct S { template<typename T> using type = T; }; template<class T> void foo() { typename T::template type<int> x; } foo<S>();
🔗
- Where and why do I have to put the
templateandtypenamekeywords? – Stack Overflow - H.Sutter. GotW #35: Typename – Guru of the Week (2009)
🎥
- A.Stepanov. Efficient programming with components (part of Lec. 12) – A9 (2013)
🎥
- H.Matthews. The C++ type system is your friend – ACCU (2017)
📖
- Ch. 1: Policy-based class design – A.Alexandrescu. Modern C++ design: Generic programming and design patterns applied – Addison-Wesley Professional (2001)
🔗
- Partial specialization of template class copy constructor – Stack Overflow
🔗
- N.Deppe. Template metaprogramming. Part 3: Tuple iteration with recursion (2017)
- N.Deppe. Template metaprogramming. Part 4: Recursion free tuple iteration (2017)
🎥
- J.Brown. Reducing template compilation overhead, using C++11, 14, 17, and 20 – CppCon (2019)
- A.Modell. C++ advanced topics in templates – Tech Talk (2014)
🔗
- N.Deppe. Template metaprogramming. Part 2: Typelist (2017)
- J.Galowicz. Type lists (2016)
- J.Galowicz. Type list compile time performance (2016)
- J.Galowicz. Transformations between user input/output and type lists (2016)
📖
- Ch. 3: Typelists – A.Alexandrescu. Modern C++ design: Generic programming and design patterns applied – Addison-Wesley Professional (2001)
See also Type traits – The standard library and Boost.
🔗
- J.Maddock, S.Cleary. C++ type traits – Dr. Dobb’s Journal (2000)
- T.Frogley. An introduction to C++ traits – ACCU (2001)
- N.Deppe. Template metaprogramming. Part 1 (2017)
🎥
- A.O’Dwyer. The best type traits that C++ doesn’t have – C++Now (2018)
- H.Matthews. The C++ type system is your friend – ACCU (2017)