~/talk

“Safe Numerics”

Talkat CppCon 2018 · 2018-09-23..09-28· [software-architecture]
links:none on file
slides:none on file

Boost.SafeNumerics uses operator overloading and template metaprogramming to make integers that either trap at compile time or throw at runtime, with configurable promotion policy (native, cpp, automatic) and an optional trap policy that forces compile-time failures. Applied to a PIC-based stepper motor controller, the 179-line implementation compiles to ~1,300 bytes on a 32K device, finds a real overflow at ~500 mm, reduces runtime checks to seven sites, and enables zero-overhead correctness by widening only the temporaries and using range-checked literals and Boost.SafeNumerics types.

AI-written summary · about

  1. 0:00The problem with integers
  2. 2:58Introducing safe numerics
  3. 5:58Runtime check elimination
  4. 8:53Real-world embedded case study
  5. 13:27Algorithm implementation
  6. 17:56Testing on the desktop
  7. 25:32Promotion and trap policies
  8. 32:36Compile-time range arithmetic
  9. 43:46Refactoring for verification
  10. 50:20Minimizing runtime costs
  11. 55:26Q&A session
~/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.