
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of John Maddock Sent: Thursday, June 14, 2012 12:14 PM To: boost@lists.boost.org Subject: Re: [boost] Is there a macro to test ifstd::numerc_limits<>::max_digits10 is supported by a platform?
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?
OK, but I'm on holiday for a while so I'll wait until I get back before I create more trouble ;-) Anyone trying multiprecision and wanting this feature can patch their \boost-trunk\boost\test\tools\impl.hpp locally. Thanks Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com