~/talk

The Power of C++ Templates With mp-units: Lessons Learned & a New Library Design

Talkat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp]
slides:none on file

mp-units v2 rewrites the library: removes the problematic Downcasting Facility, abandons user-defined literals for quantities, and models ISO ISQ quantity trees so frequency, radioactivity and “one per second” stay distinct. It uses heavy C++20/23 NTTPs and expression templates to generate readable compiler types, supports quantity kinds for safe addition/conversion (preventing Hz+Bq), exposes value/reference as structural NTTPs, and requires modern compilers (GCC 12.2+) while adding features like compile‑time physical constants (g, c) that strip where possible.

AI-written summary · about

  1. 0:00mp-units library rewrite intro
  2. 1:46Previous design issues
  3. 8:27Doncaster casting limits
  4. 17:14User-defined literals drawbacks
  5. 21:50mp-units v2 introduction
  6. 25:23International System of Quantities
  7. 31:01Quantity kinds importance
  8. 39:38Quantity specs & units
  9. 48:51Creating quantities in v2
  10. 54:08Error messages with expression templates
  11. 1:00:27Quantity conversions & casts
  12. 1:08:59ADL limits with NTTPs
  13. 1:14:09Affine types & quantity points
  14. 1:16:12Lightweight physical constants
  15. 1:19:45Improvements & future directions
~/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.