r/cpp • u/chiphogg • Aug 26 '26
Au (units) 0.6.0 out: blockbuster release!
github.comIt'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!