~/talk

Back to Basics: Templates in C++

Talkat CppCon 2022 · 2022-09-11..09-16· [rust]
slides:none on file

Covers concrete, up-to-date rules and examples: function and class templates, return-type deduction for mixed-type my_max, class template argument deduction for containers, non-type template parameters (std::array size), variadic templates with recursion vs compile-time if, and use of C++20 Concepts to resolve overloads (push_back vs insert) and produce clearer errors. Demonstrates what compiles, when templates instantiate, where code size or compile-time cost shows up, and which patterns actually work.

AI-written summary · about

  1. 0:00Start
  2. 2:42Function Templates
  3. 6:40Template Instantiation
  4. 11:15Sprint Function
  5. 12:28Function Template
  6. 21:48Multiple Template Parameters
  7. 27:51Class Template
  8. 42:19Std Array
  9. 44:41Non-Type Template Parameter
  10. 47:20Print Function
  11. 49:44Lesson To Learn about Templates
  12. 50:43Compile Time
  13. 53:51Overload Resolution
~/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.