Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79861 - sandbox/big_number/libs/multiprecision/performance
From: john_at_[hidden]
Date: 2012-08-04 06:59:57


Author: johnmaddock
Date: 2012-08-04 06:59:56 EDT (Sat, 04 Aug 2012)
New Revision: 79861
URL: http://svn.boost.org/trac/boost/changeset/79861

Log:
Fix C++11 compiler issues
Text files modified:
   sandbox/big_number/libs/multiprecision/performance/arithmetic_backend.hpp | 18 +++++++-------
   sandbox/big_number/libs/multiprecision/performance/performance_test.cpp | 50 ++++++++++++++++++++--------------------
   2 files changed, 34 insertions(+), 34 deletions(-)

Modified: sandbox/big_number/libs/multiprecision/performance/arithmetic_backend.hpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/arithmetic_backend.hpp (original)
+++ sandbox/big_number/libs/multiprecision/performance/arithmetic_backend.hpp 2012-08-04 06:59:56 EDT (Sat, 04 Aug 2012)
@@ -545,15 +545,15 @@
    typedef std::numeric_limits<long double> base_type;
    typedef boost::math::concepts::real_concept number_type;
 public:
- BOOST_STATIC_CONSTEXPR number_type (min)() BOOST_NOEXCEPT { return (base_type::min)(); }
- BOOST_STATIC_CONSTEXPR number_type (max)() BOOST_NOEXCEPT { return (base_type::max)(); }
- BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
- BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_NOEXCEPT { return base_type::epsilon(); }
- BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_NOEXCEPT { return epsilon() / 2; }
- BOOST_STATIC_CONSTEXPR number_type infinity() BOOST_NOEXCEPT { return base_type::infinity(); }
- BOOST_STATIC_CONSTEXPR number_type quiet_NaN() BOOST_NOEXCEPT { return base_type::quiet_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_NOEXCEPT { return base_type::signaling_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_NOEXCEPT { return base_type::denorm_min(); }
+ static const number_type (min)() BOOST_NOEXCEPT { return (base_type::min)(); }
+ static const number_type (max)() BOOST_NOEXCEPT { return (base_type::max)(); }
+ static const number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
+ static const number_type epsilon() BOOST_NOEXCEPT { return base_type::epsilon(); }
+ static const number_type round_error() BOOST_NOEXCEPT { return epsilon() / 2; }
+ static const number_type infinity() BOOST_NOEXCEPT { return base_type::infinity(); }
+ static const number_type quiet_NaN() BOOST_NOEXCEPT { return base_type::quiet_NaN(); }
+ static const number_type signaling_NaN() BOOST_NOEXCEPT { return base_type::signaling_NaN(); }
+ static const number_type denorm_min() BOOST_NOEXCEPT { return base_type::denorm_min(); }
 };
 
 }

Modified: sandbox/big_number/libs/multiprecision/performance/performance_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/performance_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/performance/performance_test.cpp 2012-08-04 06:59:56 EDT (Sat, 04 Aug 2012)
@@ -384,25 +384,25 @@
    //
    // Hetero operations:
    //
- template <class T>
- static T get_hetero_test_value(boost::mpl::false_ const&)
+ template <class U>
+ static U get_hetero_test_value(boost::mpl::false_ const&)
    {
- return T(2) / 3;
+ return U(2) / 3;
    }
- template <class T>
- static T get_hetero_test_value(boost::mpl::true_ const&)
+ template <class U>
+ static U get_hetero_test_value(boost::mpl::true_ const&)
    {
- return (std::numeric_limits<T>::max)() >> 4;
+ return (std::numeric_limits<U>::max)() >> 4;
    }
- template <class T>
- static T get_hetero_test_value()
+ template <class U>
+ static U get_hetero_test_value()
    {
- return get_hetero_test_value<T>(boost::is_integral<T>());
+ return get_hetero_test_value<U>(boost::is_integral<U>());
    }
- template <class T>
+ template <class U>
    double test_multiply_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       stopwatch<boost::chrono::high_resolution_clock> w;
       for(unsigned i = 0; i < 1000; ++i)
       {
@@ -411,10 +411,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_inplace_multiply_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       for(unsigned i = 0; i < b.size(); ++i)
          a[i] = b[i];
       stopwatch<boost::chrono::high_resolution_clock> w;
@@ -425,10 +425,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_add_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       stopwatch<boost::chrono::high_resolution_clock> w;
       for(unsigned i = 0; i < 1000; ++i)
       {
@@ -437,10 +437,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_inplace_add_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       for(unsigned i = 0; i < b.size(); ++i)
          a[i] = b[i];
       stopwatch<boost::chrono::high_resolution_clock> w;
@@ -451,10 +451,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_subtract_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       stopwatch<boost::chrono::high_resolution_clock> w;
       for(unsigned i = 0; i < 1000; ++i)
       {
@@ -463,10 +463,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_inplace_subtract_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       for(unsigned i = 0; i < b.size(); ++i)
          a[i] = b[i];
       stopwatch<boost::chrono::high_resolution_clock> w;
@@ -477,10 +477,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_divide_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       stopwatch<boost::chrono::high_resolution_clock> w;
       for(unsigned i = 0; i < 1000; ++i)
       {
@@ -489,10 +489,10 @@
       }
       return boost::chrono::duration_cast<boost::chrono::duration<double> >(w.elapsed()).count();
    }
- template <class T>
+ template <class U>
    double test_inplace_divide_hetero()
    {
- static const T val = get_hetero_test_value<T>();
+ static const U val = get_hetero_test_value<U>();
       for(unsigned i = 0; i < b.size(); ++i)
          a[i] = b[i];
       stopwatch<boost::chrono::high_resolution_clock> w;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk