~/talk

Type safe C++? LOL!

Talkat NDC Oslo 2018 · 2018-06-11..06-15· [c-and-cpp]
slides:none on file

Argues C++ can be made reliably type safe by turning primitives into distinct types using a safe_type<T,Tag> template with deleted cross-constructors and the CRTP tag trick so requestID and receiverID cannot mix. Demonstrates serializing slot counts as a dedicated type, models indices/counts as affine-space relations, and warns of the enum class fruit salad bug that breaks presumed safety. Shows small custom library plus GitHub strong-type/name-type implementations, and measures no runtime cost — sometimes slight speedups.

AI-written summary · about

  1. 0:00Start
  2. 1:29What Is Type Safety
  3. 7:37Compilation Error
  4. 18:57Type Safe Library Zero Overhead Utilities for Preventing Bugs at Compile Time
  5. 25:50What Happens with Your Code When You Use Strong Types
  6. 29:48Encapsulation
  7. 32:30Type Semantics
  8. 37:26Affine Space Types
  9. 38:53Test Code
  10. 45:52Type Aliases
  11. 46:37Aliasing
~/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.