~/talk

Template Metaprogramming: Type Traits (part 2 of 2)

Talkat CppCon 2020 · 2020-09-14..09-18· at 12:00· destroy_n(), online· [rust]
links:none on file
slides:none on file

Continues implementing standard type traits from first half by showing concrete code: counts like 14 primary type categories, examples needing up to 12 or 64 specializations motivate abstractions such as remove_cv composition and alias-template meta‑functions; builds is_same, is_floating_point, is_integral, is_array, is_pointer and shows reducing dozens of specializations to a few composed meta‑functions; demonstrates overload resolution, decltype/declval in unevaluated contexts, and SFINAE (substitution failure is not an error) to detect classes versus other categories; notes some traits require compiler intrinsics.

AI-written summary · about

  1. 0:00Start
  2. 0:36Primary type categories is_class
  3. 3:21is_null_pointer
  4. 6:33Metafunction Abstractions
  5. 8:10Code Review
  6. 8:51A Step In The Right Direction
  7. 10:42remove_volatile
  8. 14:00remove_cv
  9. 22:15is_floating_point: redux
  10. 23:16is_integral: redux
  11. 26:50is_array
  12. 31:59is_pointer
  13. 33:44is_union
  14. 36:40is_class_or_union
  15. 39:44Function Overload Resolution
  16. 44:02SFINAE
~/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.