~/talk

Cute C++ Tricks, Part 2.5 of N - Code You Should Learn From & Never Write

Talkat CppCon 2022 · 2022-09-11..09-16· [typescript]
links:none on file
slides:none on file

Dissects 25-line C++ snippets that teach and tempt: shows the actual hacks, why they work, and when they fail. Demonstrates partial specialization via lambda requires using explicit template parameters and Godbolt experiments, points out a Clang implementation bug, and contrasts an implementation using class-template partial specialization with a typeless sort sketch that builds a variant array and sorts type indices. Also shows a literal-indexed tuple built from a user-defined literal template. Most tricks work but are unsafe for production.

AI-written summary · about

  1. 0:00Intro
  2. 1:10Goals
  3. 2:43Confession
  4. 5:42Disclaimers
  5. 7:40Concepts
  6. 9:13Edible
  7. 10:52Partial Specialization
  8. 13:36Shadowing
  9. 14:59Named Concepts
  10. 17:13Specialization
  11. 18:36Subsumption Specific
  12. 20:13Name Concepts
  13. 21:11Function Template Partial Specialization
  14. 24:29Challenges
  15. 29:27Challenge 1B
  16. 30:51Challenge 2A
  17. 34:02General Pattern
  18. 34:45Overloads
  19. 35:14Why you should never write this
  20. 36:34Better ways to do this
  21. 38:03More tricks
  22. 39:11C literals
  23. 41:19Userdefined literals
  24. 42:37Userdefined literal templates
  25. 44:56Userdefined literal suffix
  26. 45:40Resolving at compile time
  27. 46:27Questions
  28. 50:01Nonevaluating Context
  29. 54:31Class Template TMP
~/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.