Regular Types and why do I care?
summary
Argues that regular types are the necessary foundation for reliable generic code, shows failures and fixes using std::sort and a counterexample that breaks strict weak ordering, and cites that over 50 STL facilities rely on compare semantics. Digs into std::optional, the string_view is a borrow type distinction versus std::span, warns about the spaceship operator (eleven active papers), and recommends making value types regular and avoiding equality unless its semantics are well defined.
AI-written summary · about
chapters (19)
- 0:00Intro
- 2:25Titus Winters Modern C++ API Design
- 7:05Mathematics Really Does Matter
- 8:47Three Algorithmic Journeys
- 10:27Fundamentals of Generic Programming
- 12:46Simplicity is Not Just for Beginners
- 13:10Revisiting Regular Types (after 20 years)
- 14:55STL and Its Design Principles
- 18:07Named Requirements
- 22:09Compare Concept
- 23:54Compare Examples
- 28:38Total ordering relationship
- 33:53Equality vs. Equivalence
- 35:09Mandatory Slide
- 39:02std::optional
- 44:16std::string_view is a borrow type
- 46:16std::span
- 47:18Non-owning reference types like string view or span
- 48:25Call To Action
related talks
01h 05mC++ Regular, Revisited
48mBack to Basics: Cpp Value Semantics
53mProduct Types for C++2x
55mThe Curiously Recurring Pattern of Coupled Types
52mStrong types for strong interfaces
01h 00mSTL Features And Implementation Techniques
01h 00mThe Implementation of Value Types
01h 01mEmbracing PODs Safely Until They Die
