
24 Feb
2013
24 Feb
'13
9:25 a.m.
Of course, I made a mistake. You need to qualify the return value with constexpr.
template<typename built_in_float_type> constexpr built_in_float_type const_pi() { // This is a true compile-time constant. return built_in_float_type(3.14159265358979323846264338327950288419716939937511); }
That only gives you a double precision constant irrespective of the cast, John.