r/cpp • • Mar 26 '26

P3054 - Quantities and Units Library

Today I delivered an Evening Session to the ISO C++ Committee on the Quantities and Units Library, which is under consideration for standardization as part of C++29. Nothing is sure for now, but fingers crossed 🤞

If you want to learn more about the proposal itself, please check the paper P3045. However, I really like the slides I presented today, so I decided to share them with you immediately as well. You can find them in my GitHub repo. Please review them, try the workshops (just click the QR code in the corner), experiment, and share feedback.

79 Upvotes

52 comments sorted by

View all comments

Show parent comment

3

u/mateusz_pusz Mar 27 '26

Everything depends on the domain you strive to model. The library is a tool that should be flexible enough to allow you to do what you need. Typically widths from different boxes should interact - if you will put them next to each other on a shelf you can easily calculate total width. If you need to isolate them as separate abstractions/spaces then you need to provide custom extensions for your domain. If you need a more detailed guidance, please stat a new discussion here https://github.com/mpusz/mp-units/discussions.