Regular, revisited
summary
Explains why regular = semi-regular + equality matters for STL algorithms, shows C++20 Concepts and three‑way comparison formalizing requirements, and gives concrete surprises: NaN breaks set/ordering semantics, and span loses operator== (so it becomes non‑regular). Demos use string_view, optional, span and sort/set examples, cites Stepanov and Winters, points to slides and survey, and argues design choices actually implemented (equality removed for span) change whether things behave intuitively.
AI-written summary · about
chapters (12)
- 0:00Regular types in C++
- 1:29Why regular types matter
- 7:13Values objects and types in C++
- 12:58Mathematical foundations essential
- 17:46STL design and value semantics
- 29:18STL algorithm requirements
- 33:42Weak ordering and sorting
- 40:09Equality vs equivalence in C++
- 44:51Regular and semi-regular types
- 50:14Modern C++ features and value semantics
- 57:04String view and non-owning types
- 1:02:22Call to action for regular types
related talks
01h 01mBack to Basics: Concepts in C++
01h 04mC++ Concepts
01h 11mC++20 Templates: The next level: Concepts and more
54mA Tour of C++ Recognised User Type Categories
59mCute C++ Tricks, Part 2.5 of N - Code You Should Learn From & Never Write
01h 02mDiscovering a User-Facing Concept
01h 02mDiscovering a User-Facing Concept
05mLightning Talks: -std=c++20 -- Will This C++ Code Compile?
