The Au C++ Units Library: Handling Physical Units Safely, Quickly, & Broadly
Talkat CppCon 2023 · on Tuesday, 2023-10-03· at 14:00· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard·
summary
Au is a C++ units library that claims C++14 compatibility, optional single-file packaging, and practical performance measurements showing compile-time overhead comparable to alternatives when unused units are trimmed. It implements unit-safe APIs, an adaptive overflow safety surface that blocks risky integer conversions at compile time, on-the-fly unit composition, smart unit-aware rounding and inverses, and a compatibility layer to interoperate with or migrate from other libraries. The repo and tutorials are provided and the features compile and run.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:59What is a Units Library
- 3:42A Simple Example
- 5:37Embedded Example
- 7:28Core Idioms
- 9:31Resources
- 10:36The Bigger Picture
- 13:19Choosing a Library
- 15:20Comparing Units Libraries
- 19:29How is the project delivered
- 21:47Cost compile times
- 25:33Unit safety
- 29:40Integers
- 33:20Size
- 36:40composability
- 41:35different kinds of same quantity
- 45:35how libraries interact
- 50:58compatibility layer
- 52:02conclusion
- 52:51questions
related talks
01h 02mUnits Libraries and Autonomous Vehicles: Lessons from the Trenches
01h 30mC++ in Constrained Environments
01h 06mPhysical Units for Matrices. How Hard Can It Be?
01h 38mC++20: Reaching for the Aims of C++
01h 23mC++23 Standard Library Preview
01h 03mUnlocking the value of C++20
01h 02mAn Overview of C++11/14, Part I
01h 02mEmbedded Friendly C++: Features That Make a Difference
