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

constexpr operator-() #144

Closed le-migou closed 6 years ago

le-migou commented 6 years ago

In order to allow this:

constexpr auto x = -1.0_m;

, operator-(unit_t) should be constexpr. (v2.3.1.)

le-migou commented 6 years ago

It's done in v3.x