~/talk

C++ Regular, Revisited

Talkat CppCon 2023 · on Monday, 2023-10-02· [rust]
slides:none on file

Revisits what “regular” means for C++ types and shows concrete pitfalls: C++20 Concepts and the spaceship operator change equality but require care; std::optional<T> and optional<T&> behave differently; string_view compares lexicographically (deep) while span is not regular because copy is shallow and deep equality would surprise users; sort requires a strict weak ordering or it breaks; recommendation is explicit: prefer types that model built-ins and make equality, copy and lifetime semantics consistent.

AI-written summary · about

  1. 0:00Introduction
  2. 1:47Revisiting regular types in C++
  3. 3:36Regular types foundations
  4. 6:03STL design principles
  5. 13:12Math in type design
  6. 17:15STL concepts and requirements
  7. 23:21Sorting requirements
  8. 29:03Equality and equivalence
  9. 34:52Semi-regular vs regular types
  10. 37:03Equality for value types
  11. 40:11C++17 vocabulary types
  12. 48:00Span non-regular type
  13. 57:07Lifetime safety implications
  14. 57:30Make types regular
  15. 1:04:53Q&A
~/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.