~/talk

Back to Basics: Function and Class Templates

Talkat CppCon 2019 · 2019-09-15..09-20· [compilers-and-language-design]
slides:none on file

Covers concrete mechanics: writing function and class templates (swap, rational, bitset), how the compiler performs template instantiation versus an explicit specialization, when to use typename for dependent names, and how C++17 changes things (class template argument deduction and inline variables). Explains template parameter lists, non-type parameters, static data members and where to place definitions, template argument deduction limits (not from return types), and explicit instantiation with extern template for link-time control.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:54Function overloading vs templates
  3. 5:07Function template basics
  4. 17:26Class template introduction
  5. 27:40Member functions in class templates
  6. 33:26Template arguments and types
  7. 43:40Two-phase template translation
  8. 53:30Instantiation vs specialization
  9. 57:27Explicit instantiation
  10. 1:00:44Explicit specialization vs overloads
  11. 1:03:00Q&A and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.