Index: boost/chrono/config.hpp =================================================================== --- boost/chrono/config.hpp (revision 80809) +++ boost/chrono/config.hpp (working copy) @@ -114,6 +114,23 @@ #endif #endif +#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) +#define BOOST_CHRONO_LIB_CONSTEXPR +#else +#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR +#endif + +#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() +#else +#ifdef BOOST_NO_NOEXCEPT +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() +#else +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept +#endif +#endif + + #if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING #error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined" Index: boost/chrono/time_point.hpp =================================================================== --- boost/chrono/time_point.hpp (revision 80809) +++ boost/chrono/time_point.hpp (working copy) @@ -217,12 +217,12 @@ // special values - static BOOST_CONSTEXPR time_point + static BOOST_CHRONO_LIB_CONSTEXPR time_point min BOOST_PREVENT_MACRO_SUBSTITUTION () { return time_point((duration::min)()); } - static BOOST_CONSTEXPR time_point + static BOOST_CHRONO_LIB_CONSTEXPR time_point max BOOST_PREVENT_MACRO_SUBSTITUTION () { return time_point((duration::max)()); Index: boost/chrono/duration.hpp =================================================================== --- boost/chrono/duration.hpp (revision 80809) +++ boost/chrono/duration.hpp (working copy) @@ -340,17 +340,17 @@ namespace detail { template ::value> struct chrono_numeric_limits { - static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits::min) ();} + static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} }; template struct chrono_numeric_limits { - static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits::min) ();} + static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} }; template <> struct chrono_numeric_limits { - static BOOST_CONSTEXPR float lowest() throw() + static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max) (); } @@ -358,7 +358,7 @@ template <> struct chrono_numeric_limits { - static BOOST_CONSTEXPR double lowest() throw() + static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max) (); } @@ -366,7 +366,7 @@ template <> struct chrono_numeric_limits { - static BOOST_CONSTEXPR long double lowest() throw() + static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max)(); } @@ -381,12 +381,12 @@ struct duration_values { static BOOST_CONSTEXPR Rep zero() {return Rep(0);} - static BOOST_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () + static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () { return (std::numeric_limits::max)(); } - static BOOST_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () + static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () { return detail::numeric_limits::lowest(); } @@ -513,11 +513,11 @@ { return duration(duration_values::zero()); } - static BOOST_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION () + static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION () { return duration((duration_values::min)()); } - static BOOST_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION () + static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION () { return duration((duration_values::max)()); } Index: libs/chrono/test/duration/duration_values_pass.cpp =================================================================== --- libs/chrono/test/duration/duration_values_pass.cpp (revision 80809) +++ libs/chrono/test/duration/duration_values_pass.cpp (working copy) @@ -15,7 +15,7 @@ #include #include "../rep.h" -#ifdef BOOST_NO_CONSTEXPR +#if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR #define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C) #else #include @@ -30,7 +30,7 @@ BOOST_TEST((D::max)().count() == max_rep); { typedef typename D::rep Rep; - BOOST_CONSTEXPR Rep max_rep = (boost::chrono::duration_values::max)(); + BOOST_CHRONO_LIB_CONSTEXPR Rep max_rep = (boost::chrono::duration_values::max)(); BOOST_CONSTEXPR_ASSERT((D::max)().count() == max_rep); } } @@ -43,7 +43,7 @@ BOOST_TEST((D::min)().count() == min_rep); { typedef typename D::rep Rep; - BOOST_CONSTEXPR Rep min_rep = (boost::chrono::duration_values::min)(); + BOOST_CHRONO_LIB_CONSTEXPR Rep min_rep = (boost::chrono::duration_values::min)(); BOOST_CONSTEXPR_ASSERT((D::min)().count() == min_rep); } Index: libs/chrono/test/time_point/min_max_pass.cpp =================================================================== --- libs/chrono/test/time_point/min_max_pass.cpp (revision 80809) +++ libs/chrono/test/time_point/min_max_pass.cpp (working copy) @@ -14,7 +14,7 @@ #include #include -#ifdef BOOST_NO_CONSTEXPR +#if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR #define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C) #else #include Index: libs/chrono/doc/chrono.qbk =================================================================== --- libs/chrono/doc/chrono.qbk (revision 80809) +++ libs/chrono/doc/chrono.qbk (working copy) @@ -2573,7 +2573,7 @@ * Breaking change `BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 ` -The default value for `BOOST_THREAD_VERSION` will be changed to 2 since Boost 1.55. +The default value for `BOOST_CHRONO_VERSION` will be changed to 2 since Boost 1.55. [endsect]