Ticket #7479: 7479.patch

File 7479.patch, 6.7 KB (added by viboes, 10 years ago)
  • boost/chrono/config.hpp

     
    114114#endif
    115115#endif
    116116
     117#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
     118#define BOOST_CHRONO_LIB_CONSTEXPR
     119#else
     120#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
     121#endif
     122
     123#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
     124#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
     125#else
     126#ifdef BOOST_NO_NOEXCEPT
     127#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
     128#else
     129#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
     130#endif
     131#endif
     132
     133
    117134#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
    118135 && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
    119136#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
  • boost/chrono/time_point.hpp

     
    217217
    218218        // special values
    219219
    220         static BOOST_CONSTEXPR time_point
     220        static BOOST_CHRONO_LIB_CONSTEXPR time_point
    221221        min BOOST_PREVENT_MACRO_SUBSTITUTION ()
    222222        {
    223223            return time_point((duration::min)());
    224224        }
    225         static BOOST_CONSTEXPR time_point
     225        static BOOST_CHRONO_LIB_CONSTEXPR time_point
    226226        max BOOST_PREVENT_MACRO_SUBSTITUTION ()
    227227        {
    228228            return time_point((duration::max)());
  • boost/chrono/duration.hpp

     
    340340namespace detail {
    341341    template <class T, bool = is_arithmetic<T>::value>
    342342    struct chrono_numeric_limits {
    343         static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits<T>::min)  ();}
     343        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
    344344    };
    345345
    346346    template <class T>
    347347    struct chrono_numeric_limits<T,true> {
    348         static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits<T>::min)  ();}
     348        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
    349349    };
    350350
    351351    template <>
    352352    struct chrono_numeric_limits<float,true> {
    353         static BOOST_CONSTEXPR float lowest() throw()
     353        static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
    354354        {
    355355            return -(std::numeric_limits<float>::max) ();
    356356        }
     
    358358
    359359    template <>
    360360    struct chrono_numeric_limits<double,true> {
    361         static BOOST_CONSTEXPR double lowest() throw()
     361        static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
    362362        {
    363363            return -(std::numeric_limits<double>::max) ();
    364364        }
     
    366366
    367367    template <>
    368368    struct chrono_numeric_limits<long double,true> {
    369         static BOOST_CONSTEXPR long double lowest() throw()
     369        static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
    370370        {
    371371            return -(std::numeric_limits<long double>::max)();
    372372        }
     
    381381struct duration_values
    382382{
    383383    static BOOST_CONSTEXPR Rep zero() {return Rep(0);}
    384     static BOOST_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
     384    static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
    385385    {
    386386        return (std::numeric_limits<Rep>::max)();
    387387    }
    388388
    389     static BOOST_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
     389    static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
    390390    {
    391391        return detail::numeric_limits<Rep>::lowest();
    392392    }
     
    513513        {
    514514            return duration(duration_values<rep>::zero());
    515515        }
    516         static BOOST_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
     516        static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
    517517        {
    518518            return duration((duration_values<rep>::min)());
    519519        }
    520         static BOOST_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
     520        static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
    521521        {
    522522            return duration((duration_values<rep>::max)());
    523523        }
  • libs/chrono/test/duration/duration_values_pass.cpp

     
    1515#include <boost/detail/lightweight_test.hpp>
    1616
    1717#include "../rep.h"
    18 #ifdef BOOST_NO_CONSTEXPR
     18#if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR
    1919#define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C)
    2020#else
    2121#include <boost/static_assert.hpp>
     
    3030    BOOST_TEST((D::max)().count() == max_rep);
    3131    {
    3232      typedef typename D::rep Rep;
    33       BOOST_CONSTEXPR Rep max_rep = (boost::chrono::duration_values<Rep>::max)();
     33      BOOST_CHRONO_LIB_CONSTEXPR Rep max_rep = (boost::chrono::duration_values<Rep>::max)();
    3434      BOOST_CONSTEXPR_ASSERT((D::max)().count() == max_rep);
    3535    }
    3636}
     
    4343    BOOST_TEST((D::min)().count() == min_rep);
    4444    {
    4545      typedef typename D::rep Rep;
    46       BOOST_CONSTEXPR Rep min_rep = (boost::chrono::duration_values<Rep>::min)();
     46      BOOST_CHRONO_LIB_CONSTEXPR Rep min_rep = (boost::chrono::duration_values<Rep>::min)();
    4747      BOOST_CONSTEXPR_ASSERT((D::min)().count() == min_rep);
    4848
    4949    }
  • libs/chrono/test/time_point/min_max_pass.cpp

     
    1414#include <boost/chrono/chrono.hpp>
    1515#include <boost/detail/lightweight_test.hpp>
    1616
    17 #ifdef BOOST_NO_CONSTEXPR
     17#if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR
    1818#define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C)
    1919#else
    2020#include <boost/static_assert.hpp>
  • libs/chrono/doc/chrono.qbk

     
    25732573
    25742574* Breaking change `BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 `
    25752575
    2576 The default value for `BOOST_THREAD_VERSION` will be changed to 2 since Boost 1.55.
     2576The default value for `BOOST_CHRONO_VERSION` will be changed to 2 since Boost 1.55.
    25772577
    25782578[endsect]
    25792579