~/talk

A Soupçon of SFINAE

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

A compact cookbook of concrete SFINAE recipes showing what compiles and what breaks: using void_t trick and decltype(declval()) for expression SFINAE to implement add_lvalue_reference, is_assignable and is_static_castable; turning constructors into templates and stalling evaluation with an extra bool parameter to disable default constructors; using bool_if_t indirection and priority_tag to make mutually exclusive or ordered overloads; a pointer_traits pointer_to fix that first compiles but initially causes a segfault until the parameter/ref logic is corrected.

AI-written summary · about

  1. 0:00Intro
  2. 0:26Outline
  3. 1:58WYOTT: true_type and false_type
  4. 4:01WYOTT: partial specialization
  5. 6:37WYOTT: trouble looms
  6. 9:01Introducing SFINAE
  7. 13:46void_t is a tool for mass production
  8. 15:06WYOTT: declval
  9. 16:55Expression SFINAE
  10. 20:47WYOTT: conditional_t
  11. 21:25WYOTT: enable_if_t
  12. 24:24Motivation: Polymorphic memory resources
  13. 25:25Fancy-pointer all the things!
  14. 29:29Explanation and solution
  15. 32:33Improve the error message
  16. 35:24Motivation: EXPLICIT constructors
  17. 39:01The wrong fix
  18. 41:51Lesson 2
  19. 42:32Motivation: pointer_traits
  20. 54:04Hierarchical tag dispatch
  21. 56:01Make up the hierarchy from outside
  22. 57:47Sometimes we must make up the hierarchy
~/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.