Partially-formed Objects for fun and profit
summary
Argues that moved-from values must be treated as partially formed, distinguishes safe vs unsafe functions by whether they let partially formed objects escape (example: std::next is unsafe, std::advance is safe), and gives actionable fixes: prefer erase/erase‑remove over raw remove, prefer std::exchange or resetting over blind std::move, ensure ADL swap or make move‑assignment self‑swap‑safe. Uses C++98→11→20 examples (remove/erase idiom, input iterators, concepts, move semantics) and a flat_map case where the default move requires extra work.
AI-written summary · about
chapters (17)
- 0:00Start
- 1:12Bonus Slides
- 1:43Disclaimer
- 4:34Partially Formed State
- 6:49Standard String
- 10:12Input Iterator Requirements
- 13:18Guideline
- 16:16Summary
- 17:17Move Semantics
- 24:21Standard Arrays
- 25:31Move Is an Unsafe Operation
- 28:08Move Semantics Summary
- 29:27Composability
- 30:29Partially Formed States Are Closed under Composition
- 32:46Lemma
- 38:59Howard Hint Extension
- 39:13Attribute Stem Element of Programming Swap








