~/talk

How C++20 Can Simplify std::tuple

Talkat ACCU 2019 · 2019-04-10..04-13· [compilers-and-language-design, c-and-cpp]
links:none on file
slides:none on file

C++20 lets a std::tuple implementation shrink from piles of SFINAE and 18 special constructors to nearly an aggregate: Concepts-based tuple_like constraint replaces fragile enable_if hacks, fold/expansion statements plus templated lambdas implement elementwise operator==, swap and operator< concisely, and no_unique_address empty storage plus aggregate parentheses remove most inheritance work. The result is an optimized, high-performance tuple built almost as a plain struct that compiles and in examples behaves correctly; allocator-aware constructors remain a loose corner case.

AI-written summary · about

  1. 0:00Intro
  2. 1:53C++20 Big Ticket Items
  3. 3:24Modules...
  4. 4:29Outline of a Module
  5. 6:10Module Preamble
  6. 7:25Naming emphasizes structure
  7. 8:56Why is get not a member?
  8. 14:11C++17 tuple Enhancments
  9. 15:54C++17 Language Features
  10. 16:58Fold Expressions (C++17)
  11. 17:31Fold Expression Grammar
  12. 19:42Generic Implementation
  13. 20:28Implementing comparison in C++17
  14. 21:21Basic Implementation
  15. 23:17SFINAE constraints
  16. 26:47Perform comparison
  17. 27:50Implementing comparison in C++20
  18. 31:17The TupleLike Concept
  19. 39:44swap using lambda in C++20
  20. 42:00swap using expansion statement in C++20
  21. 43:18Expansion Statements
  22. 44:22Support Structured Binding
  23. 45:29Implementing operators in
  24. 47:26with expansion statement
  25. 48:11Final Rendering with the Spaceship Operator
  26. 52:06What Can Spaceship Return?
  27. 54:13Implementation Strategy 1
  28. 55:01Basic Model
  29. 56:29Implementing get
  30. 57:06Ideal Version of wrap
  31. 57:19Issues with wrap
~/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.