~/talk

Sane and Safe C++ Class Types

Talkat NDC TechTown 2018 · 2018-09-27..09-30· [software-architecture]
slides:none on file

Gives a compact map of which C++ class patterns are safe, which require expert care, and which are dangerous, with concrete gotchas and fixes: set of double with NaN collapsing to one element shows how IEEE NaN breaks ordering, endless unsigned loop demonstrates unsigned underflow producing nonterminating loops, and examples show how raw pointers, implicit single-arg constructors and mixed special-member functions cause bugs. Recommends wrapping primitives as domain types, prefer value types, make polymorphic types noncopyable/move-deleted, and treat spans/string_view as dangling-risk pointing types.

AI-written summary · about

  1. 0:00Intro
  2. 1:04Safety Critical Systems
  3. 3:46Regular
  4. 4:56Other types
  5. 11:38Sane
  6. 13:20Not a number
  7. 16:22Loops
  8. 18:05Integral Promotions
  9. 20:09Primitive Types
  10. 24:27unsigned and ins
  11. 26:03check pattern
  12. 28:54different types
  13. 30:08default constructor
  14. 36:07weightcounter
  15. 37:28empty classes
  16. 38:06iterate attacks
  17. 38:37emptybase
  18. 39:40Equality
  19. 40:51Adapters
  20. 41:34Pointing Types
  21. 43:02Iterators
  22. 44:08No pointers
  23. 46:41Inheritance
  24. 47:15The Table
  25. 48:31My Recommendation
  26. 48:59Polymorphic Classes
  27. 52:01Conclusion
~/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.