~/talk

Class Template Argument Deduction: A New Abstraction

Talkat CppCon 2017 · 2017-09-24..09-29· [compilers-and-language-design]
links:none on file
slides:none on file

Class template argument deduction (CTAD) in C++17 claims to be more than keystroke savings: it creates a new abstraction where a template-name-plus-parentheses becomes an interface for all specializations. It uses automatic deduction candidates (constructor-derived, copy, default-constructor) plus user-written deduction guide overloads; guides join overload resolution rather than replace defaults. Practical techniques include the take-by-value guide pattern, the identity_t trick to disable automatic candidates, and targeted guides (e.g., stoul-string for char arrays); these enable new, working interfaces but need careful design.

AI-written summary · about

  1. 0:00C++17’s hidden power
  2. 3:44What CTAD really is
  3. 18:19Deduction candidates explained
  4. 20:50Deduction guide toolbox
  5. 36:39Designing with CTAD
  6. 47:24Conclusion and Q&A
~/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.