~/talk

Better Code: Exploring Validity in C++

Talkat CppCon 2023 · on Friday, 2023-10-06· at 14:45· Adams, 6700 North Gaylord Rockies Boulevard· [rust]
linkedin:david-sankel
slides:none on file

Defines validity as a relation to an operation and gives precise labels: discardable for objects safe only to destroy or assign, meaningless for moved‑from or minimally exception‑safe objects, and class invariant for predicates that must hold. Uses concrete C++ examples — SSO strings, std::unique_ptr with delete p.get followed by p.release, a hash map xored with a global seed, std::move and make_unique — and draws practical rules for preconditions, postconditions, and when to check invariants.

AI-written summary · about

  1. 0:00Introduction
  2. 2:07Defining validity
  3. 4:32Validity in C++
  4. 6:02Invalid pointers
  5. 7:34Argument validity practices
  6. 8:50Object state
  7. 12:24Object substance
  8. 16:09Behavior and substance
  9. 18:24Valid objects
  10. 21:41Class invariants
  11. 25:06Invariant rules
  12. 28:41Object essence
  13. 32:10Value types
  14. 35:18Meaningless objects
  15. 38:54Exception safety
  16. 41:02Summary of concepts
  17. 42:39Philosophical implications
  18. 44:58Q&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.