Modern C++ Design (part 2 of 2)
summary
Argues concrete rules for parameter passing and type design: when to use rvalue-references, reference-qualified overloads, and how to express maybe move semantics; builds a taxonomy of properties (copyable, movable, comparable, Regular) and highlights dependent preconditions as a key pitfall. Shows string_view is a useful but sharp-edged reference type while common span formulations are effectively broken, warns that move-only types imply unique ownership, and recommends preferring self-contained regular value types unless a careful design justifies otherwise.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:57Thread safety taxonomy
- 6:11Logical state and comparison
- 10:23Ordering, copy, and move
- 12:33Mutability and traits
- 14:15Invariants and encapsulation
- 16:41Preconditions
- 20:10Aliasing and sharing
- 22:15Dependent preconditions
- 24:48Regular types
- 29:40String view analysis
- 32:36Span analysis
- 35:56Subsets of regular
- 37:32Business logic types
- 40:04Structs and invariants
- 41:36Reference types
- 43:59Q&A
related talks
54mBack to Basics: Move Semantics (part 2 of 2)
55mBack to Basics: Move Semantics (part 1 of 2)
01h 20mWhat Classes We Design and How
01h 11mI just wanted to point to something!
01h 02mUnderstanding C++ Value Categories: lvalue, rvalue, xvalue, std::move, std::forward & Best Practices
01h 28mModern C++ Design reloaded
01h 06mRegular Types: From Stepanov to C++ Concepts
01h 08mRegular Types and Why Do I Care ?
