$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r80921 - in branches/release: boost/chrono boost/chrono/detail boost/chrono/io boost/chrono/io_v1 libs/chrono/doc libs/chrono/src libs/chrono/test/duration libs/chrono/test/io libs/chrono/test/time_point libs/chrono/test/traits
From: vicente.botet_at_[hidden]
Date: 2012-10-09 19:12:26
Author: viboes
Date: 2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
New Revision: 80921
URL: http://svn.boost.org/trac/boost/changeset/80921
Log:
Chrono: merge 80897
Properties modified: 
   branches/release/boost/chrono/detail/   (props changed)
   branches/release/boost/chrono/io/   (props changed)
   branches/release/boost/chrono/io_v1/   (props changed)
   branches/release/libs/chrono/src/   (props changed)
   branches/release/libs/chrono/test/duration/   (props changed)
   branches/release/libs/chrono/test/io/   (props changed)
   branches/release/libs/chrono/test/time_point/   (props changed)
   branches/release/libs/chrono/test/traits/   (props changed)
Text files modified: 
   branches/release/boost/chrono/config.hpp                            |    17 +++++++++++++++++                       
   branches/release/boost/chrono/duration.hpp                          |    18 +++++++++---------                      
   branches/release/boost/chrono/time_point.hpp                        |     4 ++--                                    
   branches/release/libs/chrono/doc/chrono.qbk                         |     1 +                                       
   branches/release/libs/chrono/test/duration/duration_values_pass.cpp |     6 +++---                                  
   branches/release/libs/chrono/test/time_point/min_max_pass.cpp       |     2 +-                                      
   6 files changed, 33 insertions(+), 15 deletions(-)
Modified: branches/release/boost/chrono/config.hpp
==============================================================================
--- branches/release/boost/chrono/config.hpp	(original)
+++ branches/release/boost/chrono/config.hpp	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -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"
Modified: branches/release/boost/chrono/duration.hpp
==============================================================================
--- branches/release/boost/chrono/duration.hpp	(original)
+++ branches/release/boost/chrono/duration.hpp	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -340,17 +340,17 @@
 namespace detail {
     template <class T, bool = is_arithmetic<T>::value>
     struct chrono_numeric_limits {
-        static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits<T>::min)  ();}
+        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
     };
 
     template <class T>
     struct chrono_numeric_limits<T,true> {
-        static BOOST_CONSTEXPR T lowest() throw() {return (std::numeric_limits<T>::min)  ();}
+        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
     };
 
     template <>
     struct chrono_numeric_limits<float,true> {
-        static BOOST_CONSTEXPR float lowest() throw()
+        static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
         {
             return -(std::numeric_limits<float>::max) ();
         }
@@ -358,7 +358,7 @@
 
     template <>
     struct chrono_numeric_limits<double,true> {
-        static BOOST_CONSTEXPR double lowest() throw()
+        static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
         {
             return -(std::numeric_limits<double>::max) ();
         }
@@ -366,7 +366,7 @@
 
     template <>
     struct chrono_numeric_limits<long double,true> {
-        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<long double>::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<Rep>::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<Rep>::lowest();
     }
@@ -514,11 +514,11 @@
         {
             return duration(duration_values<rep>::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<rep>::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<rep>::max)());
         }
Modified: branches/release/boost/chrono/time_point.hpp
==============================================================================
--- branches/release/boost/chrono/time_point.hpp	(original)
+++ branches/release/boost/chrono/time_point.hpp	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -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)());
Modified: branches/release/libs/chrono/doc/chrono.qbk
==============================================================================
--- branches/release/libs/chrono/doc/chrono.qbk	(original)
+++ branches/release/libs/chrono/doc/chrono.qbk	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -7273,6 +7273,7 @@
 [*Fixes:]
 
 * [@http://svn.boost.org/trac/boost/ticket/7381 #7381] C++11 compliance: unresolved symbol when assigning a constexpr duration to a non-const local variable.
+* [@http://svn.boost.org/trac/boost/ticket/7479 #7479] Compiles fails with compilers supporting constexpr fails if the standard library doesn't provides the constexpr interface
 
 [*Would not fix:]
 
Modified: branches/release/libs/chrono/test/duration/duration_values_pass.cpp
==============================================================================
--- branches/release/libs/chrono/test/duration/duration_values_pass.cpp	(original)
+++ branches/release/libs/chrono/test/duration/duration_values_pass.cpp	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -15,7 +15,7 @@
 #include <boost/detail/lightweight_test.hpp>
 
 #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 <boost/static_assert.hpp>
@@ -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<Rep>::max)();
+      BOOST_CHRONO_LIB_CONSTEXPR Rep max_rep = (boost::chrono::duration_values<Rep>::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<Rep>::min)();
+      BOOST_CHRONO_LIB_CONSTEXPR Rep min_rep = (boost::chrono::duration_values<Rep>::min)();
       BOOST_CONSTEXPR_ASSERT((D::min)().count() == min_rep);
 
     }
Modified: branches/release/libs/chrono/test/time_point/min_max_pass.cpp
==============================================================================
--- branches/release/libs/chrono/test/time_point/min_max_pass.cpp	(original)
+++ branches/release/libs/chrono/test/time_point/min_max_pass.cpp	2012-10-09 19:12:25 EDT (Tue, 09 Oct 2012)
@@ -14,7 +14,7 @@
 #include <boost/chrono/chrono.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#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 <boost/static_assert.hpp>