Ticket #5758: max_digits10.diff

File max_digits10.diff, 959 bytes (added by Jürgen Hunold, 10 years ago)

Check for BOOST_NO_NUMERIC_LIMITS_LOWEST

  • boost/test/tools/impl.hpp

    diff --git a/boost/test/tools/impl.hpp b/boost/test/tools/impl.hpp
    index 97c4c1b..f6fa5ea 100755
    a b struct print_log_value {  
    8888    {
    8989        if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 )
    9090            ostr.precision( 2 + std::numeric_limits<T>::digits * 301/1000 );
    91         /*
    92         This needs a test for support of max_digits10 to avoid failures on platforms that do not support.
     91#if !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
    9392        if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 10 )
    9493            ostr.precision( 2 + std::numeric_limits<T>::max_digits10);
    9594            // Assume that max_digits10 is provided for all radix 10 as they are quite new,
    9695            // and anyway Kahan formula will not work for decimal.
    97         */
     96#endif
    9897    }
    9998
    10099    void set_precision( std::ostream&, mpl::true_ ) {}