~/talk

C++ Templates Revised

Talkat CppCon 2017 · 2017-09-24..09-29
links:none on file
slides:none on file

Second edition integrates Modern C++ and shows concrete fixes and patterns for real code: use inline constexpr static members to avoid ODR linker errors for trait values, prefer type-based traits or void_t for SFINAE, and consider Boost.Hana style is_valid helpers to cut boilerplate. Beware of string_view nightmare causing dangling views and prefer auto return types or decltype(auto) for perfect forwarding combined with invoke_result_t and if constexpr to handle void and nonvoid paths. Examples compile on current compilers and nested variadic patterns demonstrate practical CRTP and pack expansion uses.

AI-written summary · about

  1. 0:00Introduction to C++ templates
  2. 3:13History of the C++ Templates book
  3. 13:50Evolution of Type Traits in C++
  4. 23:42Strings and auto in templates
  5. 35:06Passing arguments by value vs reference
  6. 47:09Return types and string_view pitfalls
  7. 53:05If constexpr and compiler checks
  8. 58:08Summary of C++ template features
~/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.