r/cpp • u/chiphogg • Aug 26 '26
Au (units) 0.6.0 out: blockbuster release!
https://github.com/aurora-opensource/au/releases/tag/0.6.0It's been just over a year since our last significant release, and this one ended up big... honestly, maybe a bit over-stuffed. π We did tackle both of the biggest requests from the last post: we no longer swallow compiler errors (see our new compiler warnings philosophy doc for more details), and we have worked examples. Besides these, some of the remaining highlights are:
- Full vector and matrix support: everything except mixed-units in a single vector/matrix
- First-class Eigen support --- the first units library to preserve Eigen's full performance in all cases
- CUDA (and HIP) are now supported out of the box
- More powerful/flexible user-defined literals compared to other libraries (see this fascinating Abbreviated Quantity Construction discussion doc for the nuances here)
- More ergonomic integer division:
divide_using_common_unit(a, b)is almost always what you want for same-dimension inputs ConstantandMagnitudenow get arithmetic and comparison operators whenever the results are computable, making them much more ergonomic
We also refreshed our C++ units library comparison page. It's awesome to see all the progress on the other leading libraries, as well as ours!
We hope you find the new release useful and fun, and we're excited to hear any feedback you may have!
β’
u/STL MSVC STL Dev Aug 26 '26
Mod-approved.
10
u/chiphogg Aug 26 '26
If I could highlight just one thing for existing Au users, it'd be: bite the bullet and upgrade; all future upgrades will be easier once you do.
Yes, there's a decent amount of breaking changes in this release, but we bend over backwards to enable incremental upgrades.
See our upgrade guide for more details.
Note that after this release, we are moving to a 4 month "release train" cadence, so we're very unlikely to have anywhere near this size of release ever again!
If you hit any snags upgrading, please get in touch. Feel free to file an Au issue, or even DM me here. I want to help people make use of all these new features we worked so hard on! π
5
u/PsecretPseudonym Aug 27 '26
Looks great. Any sense on how the latest version of Au compares with that of mp-units?
Iβve been considering both, and they seem similar but rapidly evolving, so itβs challenging to keep track of how to consider/choose presently.
2
u/SunnybunsBuns Aug 28 '26
Does this have, or lead easily to having, the ability to wrap angel units? Either +/- pi or [0,2pi)? Obviously not a deal breaker, but would certainly keep a bunch of engineers here from foobaring their filter math.
2
u/DryEnergy4398 Aug 26 '26
Awesome! We love AU :-)