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
947 stars 135 forks source link

Convert optimizations backport #222

Closed JohelEGP closed 3 years ago

JohelEGP commented 5 years ago

I noticed that the constexpr Pi overloads (and branches for v3.x) don't assign the result of pow to a constexpr variable, which might result in the calls actually being performed at runtime for implementations less eager to do stuff at compile time.