Subject: Re: [boost] MS VC10 std::numeric_limits<float>::max_digits10 iswrong for float
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2011-06-08 20:32:23
[Paul A. Bristow]
> in dinkumware.hpp I think it should be
> // C++0x headers implemented in 520 (as shipped by Microsoft)
> (assuming 520 is the version shipped with VC10 and that VC11 will correct and bump _CPPLIB_VER ?)
> Note _CPPLIB_VER <= rather than < 520 for other similar macros
> #if !defined(_CPPLIB_VER) || _CPPLIB_VER <= 520
> # define BOOST_NO_NUMERIC_LIMITS_ MAX_DIGITS10
I can't speak for other compilers using Standard Library implementations licensed from Dinkumware, but for VC you should never look at _CPPLIB_VER. Instead, you should check _MSC_VER, which corresponds to VC's major version number. (VC8 is 1400, VC9 is 1500, VC10 is 1600, VC11 is 1700.) Especially don't look at _HAS_TR1 (already removed!) or _HAS_CPP0X (will be removed as soon as I can claw it out of our build system and tests).
Separately, Dinkumware has told me that 8 really is the right answer here, not 9. I know exactly one thing about floating point - to treat it with respect and fear, mostly fear - so I'll need to ask for more info.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk