~/talk

Space Invaders: The C++20 Spaceship Operator is Upon Us

Talkat ACCU 2023 · 2023-04-19..04-22· [compilers-and-language-design]
slides:none on file

Explains what breaks when flipping -std=c++20 on real code and why the compiler's rewriting rules can introduce infinite swap or ambiguity with implicit conversions; shows how defaulted and hand‑written three‑way operators interact, when the compiler generates six operators and when only four appear, and how to pick return types using comparison categories (strong/weak/partial) and std::common_comparison_category; gives concrete fixes (remove free ops, force member calls, add conversions) and shows examples that compile and fail so you know what to change.

AI-written summary · about

  1. 0:00C++20 spaceship operator intro
  2. 1:55Sorting siblings in music DB
  3. 3:20Equality and relational ops
  4. 5:46Symmetry issues with hidden friends
  5. 9:19Operator symmetry C++20 rewrites
  6. 12:14Spaceship operator build breaks
  7. 16:09Defaulted spaceship operator basics
  8. 18:20Return type and comparison cats
  9. 23:20Non-defaulted spaceship operator
  10. 27:57Equivalence vs equality
  11. 30:30Ordering: strong weak partial
  12. 34:30Return type conflicts handling
  13. 38:27Doubles and ordering support
  14. 39:35Generic code and comparison cats
  15. 41:22Relational and inequality rewrites
  16. 45:48Concepts with three-way comparison
  17. 48:46Inheritance and defaulted spaceship
  18. 50:52Summary and closing
~/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.