nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
952 stars 135 forks source link

Add std::hash specialization #139

Closed JohelEGP closed 6 years ago

JohelEGP commented 6 years ago

Makes the units hashable. I took the liberty of making it constexpr rather than not and using the std::hash of the underlying type.

Drive-by fix: remove CompileTimeArithmetic test ?scope? I think it predates constexpr units.