There's several libraries, including some supporting units and mathematical operations yielding the correct result types.

And as usual, it mostly comes with zero overhead, beyond optional runtime range checking and unit conversions.

But C++ is a meta-programming language. Making up your own types with full operator overloading and implicit and explicit conversions is rather easy.

And the ADA feature of automatically selecting a suitable type under the hood isn't actually that useful, since computers don't really handle that many basic types on a hardware level. (And just to be clear, C++ templates can do the same either way)

But do these libraries allow using values in aggregates (i.e. structs that can be initialized by listing members in {} )? While preventing endianness errors