~/talk

The C++ Type System is your Friend

Talkat NDC London 2017 · 2017-01-16..01-20· [c-and-cpp]
links:none on file
slides:none on file

Shows concrete techniques: wrap ints into strong types with user-defined literals and explicit constructors, enforce ranges with constexpr so some errors become compiler errors, and generate operators via templates and CRTP to get relational operations inlined. Builds a compile-time physical-units system (meters/seconds) that prevents mixing units — cites the Mars Climate Orbiter mismatch — and a fixed-length string with pluggable overflow policies using enable_if and SFINAE. Claims zero runtime overhead and demonstrates it compiles down to the same code as raw numbers.

AI-written summary · about

  1. 0:00Intro
  2. 0:30Why this talk
  3. 1:03Three important things
  4. 2:50History of programming types
  5. 5:17Types in C
  6. 6:46Using the Type System
  7. 7:55Compilation
  8. 9:16Example
  9. 12:42Whole Value Pattern
  10. 14:35Templates
  11. 15:35Header Files
  12. 16:07Constructors
  13. 18:41Explicit Operations
  14. 22:18CRTP
  15. 24:23C Runtime Polymorphism
  16. 26:25Physical Quantities
  17. 29:32Related Flavors
  18. 30:08Template Metaprogramming
  19. 32:17Operator Traits
  20. 36:11Fixed Length String
  21. 37:31Policy Decisions
  22. 40:18Context Per
  23. 41:18Runtime Check
  24. 42:19Implicit vs Explicit
  25. 44:27Compilation vs Templates
  26. 46:30First attempt
  27. 48:05Error messages without concepts
  28. 48:37Error messages with concepts
  29. 49:33Summary
~/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.