Ticket #7479: 7479.patch
File 7479.patch, 6.7 KB (added by , 10 years ago) |
---|
-
boost/chrono/config.hpp
114 114 #endif 115 115 #endif 116 116 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 117 134 #if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ 118 135 && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING 119 136 #error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined" -
boost/chrono/time_point.hpp
217 217 218 218 // special values 219 219 220 static BOOST_C ONSTEXPR time_point220 static BOOST_CHRONO_LIB_CONSTEXPR time_point 221 221 min BOOST_PREVENT_MACRO_SUBSTITUTION () 222 222 { 223 223 return time_point((duration::min)()); 224 224 } 225 static BOOST_C ONSTEXPR time_point225 static BOOST_CHRONO_LIB_CONSTEXPR time_point 226 226 max BOOST_PREVENT_MACRO_SUBSTITUTION () 227 227 { 228 228 return time_point((duration::max)()); -
boost/chrono/duration.hpp
340 340 namespace detail { 341 341 template <class T, bool = is_arithmetic<T>::value> 342 342 struct chrono_numeric_limits { 343 static BOOST_C ONSTEXPR 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) ();} 344 344 }; 345 345 346 346 template <class T> 347 347 struct chrono_numeric_limits<T,true> { 348 static BOOST_C ONSTEXPR 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) ();} 349 349 }; 350 350 351 351 template <> 352 352 struct chrono_numeric_limits<float,true> { 353 static BOOST_C ONSTEXPR float lowest() throw()353 static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW 354 354 { 355 355 return -(std::numeric_limits<float>::max) (); 356 356 } … … 358 358 359 359 template <> 360 360 struct chrono_numeric_limits<double,true> { 361 static BOOST_C ONSTEXPR double lowest() throw()361 static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW 362 362 { 363 363 return -(std::numeric_limits<double>::max) (); 364 364 } … … 366 366 367 367 template <> 368 368 struct chrono_numeric_limits<long double,true> { 369 static BOOST_C ONSTEXPR long double lowest() throw()369 static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW 370 370 { 371 371 return -(std::numeric_limits<long double>::max)(); 372 372 } … … 381 381 struct duration_values 382 382 { 383 383 static BOOST_CONSTEXPR Rep zero() {return Rep(0);} 384 static BOOST_C ONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()384 static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () 385 385 { 386 386 return (std::numeric_limits<Rep>::max)(); 387 387 } 388 388 389 static BOOST_C ONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()389 static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () 390 390 { 391 391 return detail::numeric_limits<Rep>::lowest(); 392 392 } … … 513 513 { 514 514 return duration(duration_values<rep>::zero()); 515 515 } 516 static BOOST_C ONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()516 static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION () 517 517 { 518 518 return duration((duration_values<rep>::min)()); 519 519 } 520 static BOOST_C ONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()520 static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION () 521 521 { 522 522 return duration((duration_values<rep>::max)()); 523 523 } -
libs/chrono/test/duration/duration_values_pass.cpp
15 15 #include <boost/detail/lightweight_test.hpp> 16 16 17 17 #include "../rep.h" 18 #if def BOOST_NO_CONSTEXPR18 #if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR 19 19 #define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C) 20 20 #else 21 21 #include <boost/static_assert.hpp> … … 30 30 BOOST_TEST((D::max)().count() == max_rep); 31 31 { 32 32 typedef typename D::rep Rep; 33 BOOST_C ONSTEXPR Rep max_rep = (boost::chrono::duration_values<Rep>::max)();33 BOOST_CHRONO_LIB_CONSTEXPR Rep max_rep = (boost::chrono::duration_values<Rep>::max)(); 34 34 BOOST_CONSTEXPR_ASSERT((D::max)().count() == max_rep); 35 35 } 36 36 } … … 43 43 BOOST_TEST((D::min)().count() == min_rep); 44 44 { 45 45 typedef typename D::rep Rep; 46 BOOST_C ONSTEXPR Rep min_rep = (boost::chrono::duration_values<Rep>::min)();46 BOOST_CHRONO_LIB_CONSTEXPR Rep min_rep = (boost::chrono::duration_values<Rep>::min)(); 47 47 BOOST_CONSTEXPR_ASSERT((D::min)().count() == min_rep); 48 48 49 49 } -
libs/chrono/test/time_point/min_max_pass.cpp
14 14 #include <boost/chrono/chrono.hpp> 15 15 #include <boost/detail/lightweight_test.hpp> 16 16 17 #if def BOOST_NO_CONSTEXPR17 #if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR 18 18 #define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C) 19 19 #else 20 20 #include <boost/static_assert.hpp> -
libs/chrono/doc/chrono.qbk
2573 2573 2574 2574 * Breaking change `BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 ` 2575 2575 2576 The default value for `BOOST_ THREAD_VERSION` will be changed to 2 since Boost 1.55.2576 The default value for `BOOST_CHRONO_VERSION` will be changed to 2 since Boost 1.55. 2577 2577 2578 2578 [endsect] 2579 2579