~/talk

Improving Our Safety With a Modern C++ Quantities and Units Library

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [software-architecture]
slides:none on file

Shows a concrete library: mp‑units implements P2981 to enforce compile‑time physical quantity and unit safety with C++20 (optional C++23) features, no runtime/size overhead, and readable compiler diagnostics. Demonstrates preventing real bugs (Mars Climate Orbiter pounds vs kilograms, Air Canada fuel misunits, Vasa ship rulers) and models quantity kinds, quantity points, vectors/tensors, and safe conversions; reproduces Columbus’s unit miscommunication (≈31% then refined to ≈24% error). Library builds on GCC/Clang today, fails to compile on current MSVC, and is under consideration for C++29 standardization.

AI-written summary · about

  1. 0:00Safety with quantities and units
  2. 13:55Unit-related disasters
  3. 20:02MP-units library for C++
  4. 33:33Unit-safe abstractions
  5. 46:57Columbus navigation errors
  6. 59:47Quantity kinds and type safety
  7. 1:18:08Library pitfalls and limits
  8. 1:29:59Summary and future
~/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.