Boost logo

Boost :

Subject: Re: [boost] [math] Support for libquadmath/ __float128
From: John Maddock (boost.regex_at_[hidden])
Date: 2013-02-24 04:25:44


>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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk