Boost logo

Boost :

Subject: Re: [boost] Is there a macro to test ifstd::numerc_limits<>::max_digits10 is supported by a platform?
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-06-14 07:13:43


>A proposed (but not reverted) fix for
>
> Trac #5758: Boost.Test Floating-point comparison diagnostic output does
> not support radix 10
>
> if( std::numeric_limits<T>::is_specialized &&
> std::numeric_limits<T>::radix == 10 )
> ostr.precision( 2 + std::numeric_limits<T>::max_digits10);
> // Assume that max_digits10 is provided for all radix 10 as
> they are quite new,
> // and anyway Kahan formula will not work for decimal.
>
> has caused trouble on platforms that do not yet support
>
> std::numeric_limits<T>::max_digits10
>
> We need a macro perhaps BOOST_NO_NUMERIC_LIMITS_ MAX_DIGITS10
>
> that will prevent the compiler seeing this code if max_digits10 is not
> supported.

Try BOOST_NO_NUMERIC_LIMITS_LOWEST as a proxy?

John.


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