~/talk

Variadic Templates in C++11 / C++14 - An Introduction

Talkat CppCon 2015 · 2015-09-21..09-25· [compilers-and-language-design]
slides:none on file

Covers concrete how‑tos: implements a variadic print_line using pack expansion and recursion with an explicit zero‑argument base case (required even if never called), demonstrates the overload‑resolution gotcha that produces surprising output during template instantiation, and shows correct use of std::forward. Builds a compile‑time FizzBuzz using make_index_sequence / index_sequence, tuples and a custom apply, verifies results with static_asserts, and shows variadic class templates, template‑template parameters and limitations of variadic lambdas.

AI-written summary · about

  1. 0:00Cevelop
  2. 1:28C++ Varargs example
  3. 2:55C/C++ Varargs sucks
  4. 5:10variadic templates pre C++11
  5. 6:35"pseudo" variadic templates Overloads
  6. 7:03Reminder functions, templates, patterns
  7. 8:49Defining a variadic template function
  8. 10:22variadic template terminology
  9. 12:14Gotcha 1 of Variadic Templates
  10. 13:47Olve Maudal's pub quiz (10)
  11. 20:32What about variadic class templates?
  12. 21:46Simple stdutuple example
  13. 24:20Other variadic class templates?
  14. 27:20Example template class Sack
  15. 27:57Varying Sack's Container
  16. 28:21template template parameters
  17. 28:55template variadic template parameters
  18. 30:00template-template argument factory
  19. 32:15Function Overloading FizzBuzz
  20. 36:02FizzBuzzi numbers simple, but wrong
  21. 37:28stduenable if SFINAE Overload selection
  22. 42:38Testing the Sequence statically
  23. 45:49stduexperimentals apply
  24. 48:46Can we do with class templates as well?
  25. 50:57Class Template Specialization
  26. 51:17Variadic Class Templates: recurse through inheritance
  27. 52:18Specialize single number dispatch
  28. 55:47Create a whole sequence for testing
  29. 57:45Wrap up
~/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.