Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63376 - in sandbox/chrono/boost: . type_traits
From: vicente.botet_at_[hidden]
Date: 2010-06-27 05:57:22


Author: viboes
Date: 2010-06-27 05:57:22 EDT (Sun, 27 Jun 2010)
New Revision: 63376
URL: http://svn.boost.org/trac/boost/changeset/63376

Log:
Replace uses of __ by _
Text files modified:
   sandbox/chrono/boost/chrono.hpp | 6 +++---
   sandbox/chrono/boost/ratio.hpp | 38 +++++++++++++++++++-------------------
   sandbox/chrono/boost/stopwatches.hpp | 6 +++---
   sandbox/chrono/boost/type_traits/common_type.hpp | 32 ++++++++++++++++++++++----------
   4 files changed, 47 insertions(+), 35 deletions(-)

Modified: sandbox/chrono/boost/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono.hpp (original)
+++ sandbox/chrono/boost/chrono.hpp 2010-06-27 05:57:22 EDT (Sun, 27 Jun 2010)
@@ -10,12 +10,12 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_CHRONO__HPP
-#define BOOST_CHRONO__HPP
+#ifndef BOOST_CHRONO_HPP
+#define BOOST_CHRONO_HPP
 
 //-----------------------------------------------------------------------------
 #include <boost/chrono/chrono.hpp>
 #include <boost/chrono/typeof/boost/chrono/chrono.hpp>
 //-----------------------------------------------------------------------------
 
-#endif // BOOST_CHRONO__HPP
+#endif // BOOST_CHRONO_HPP

Modified: sandbox/chrono/boost/ratio.hpp
==============================================================================
--- sandbox/chrono/boost/ratio.hpp (original)
+++ sandbox/chrono/boost/ratio.hpp 2010-06-27 05:57:22 EDT (Sun, 27 Jun 2010)
@@ -39,11 +39,11 @@
 #include <boost/integer_traits.hpp>
 
 #ifndef BOOST_RATIO_USES_MPL_ASSERT
-#define BOOST_RATIO_OVERFLOW_IN_LL_ADD "overflow in ll_add"
-#define BOOST_RATIO_OVERFLOW_IN_LL_ADD "overflow in ll_add"
-#define BOOST_RATIO_OVERFLOW_IN_LL_SUB "overflow in ll_sub"
-#define BOOST_RATIO_OVERFLOW_IN_LL_MUL "overflow in ll_mul"
-#define BOOST_RATIO_OVERFLOW_IN_LL_DIV "overflow in ll_div"
+#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
+#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
+#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
+#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
+#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
 #define BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
 #define BOOST_RATIO_RATIO_DIVIDE_BY_0 "ratio divide by 0"
 #define BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
@@ -62,7 +62,7 @@
 #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
 #define BOOST_RATIO_CONCAT(A,B) A##B
 #define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_chrono_test_,__LINE__)[CND];
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(boost_ratio_test_,__LINE__)[CND];
 #else
 #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
 #endif
@@ -172,7 +172,7 @@
       static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
       #endif
 
- BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_LL_ADD, ());
+ BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ());
   public:
       static const boost::intmax_t value = X + Y;
   };
@@ -196,7 +196,7 @@
       static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
       #endif
 
- BOOST_RATIO_STATIC_ASSERT(min - Y <= X, BOOST_RATIO_OVERFLOW_IN_LL_ADD, ());
+ BOOST_RATIO_STATIC_ASSERT(min - Y <= X, BOOST_RATIO_OVERFLOW_IN_ADD, ());
   public:
       static const boost::intmax_t value = X + Y;
   };
@@ -216,7 +216,7 @@
       static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
       #endif
 
- BOOST_RATIO_STATIC_ASSERT(min + Y <= X, BOOST_RATIO_OVERFLOW_IN_LL_SUB, ());
+ BOOST_RATIO_STATIC_ASSERT(min + Y <= X, BOOST_RATIO_OVERFLOW_IN_SUB, ());
   public:
       static const boost::intmax_t value = X - Y;
   };
@@ -240,7 +240,7 @@
       static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
       #endif
 
- BOOST_RATIO_STATIC_ASSERT(X <= max + Y, BOOST_RATIO_OVERFLOW_IN_LL_SUB, ());
+ BOOST_RATIO_STATIC_ASSERT(X <= max + Y, BOOST_RATIO_OVERFLOW_IN_SUB, ());
   public:
       static const boost::intmax_t value = X - Y;
   };
@@ -261,9 +261,9 @@
       static const boost::intmax_t a_x = static_abs<X>::value;
       static const boost::intmax_t a_y = static_abs<Y>::value;
 
- BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_LL_MUL, ());
- BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_LL_MUL, ());
- BOOST_RATIO_STATIC_ASSERT(a_x <= max / a_y, BOOST_RATIO_OVERFLOW_IN_LL_MUL, ());
+ BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ());
+ BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ());
+ BOOST_RATIO_STATIC_ASSERT(a_x <= max / a_y, BOOST_RATIO_OVERFLOW_IN_MUL, ());
   public:
       static const boost::intmax_t value = X * Y;
   };
@@ -302,9 +302,9 @@
       static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
       #endif
 
- BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_LL_DIV, ());
- BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_LL_DIV, ());
- BOOST_RATIO_STATIC_ASSERT(Y != 0, BOOST_RATIO_OVERFLOW_IN_LL_DIV, ());
+ BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ());
+ BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ());
+ BOOST_RATIO_STATIC_ASSERT(Y != 0, BOOST_RATIO_RATIO_DIVIDE_BY_0, ());
   public:
       static const boost::intmax_t value = X / Y;
   };
@@ -328,9 +328,9 @@
 template <boost::intmax_t N, boost::intmax_t D>
 class ratio
 {
- BOOST_RATIO_STATIC_ASSERT(boost::detail::static_abs<N>::value >= 0, BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE, ());
- BOOST_RATIO_STATIC_ASSERT(boost::detail::static_abs<D>::value > 0, BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE, ());
- BOOST_RATIO_STATIC_ASSERT(D != 0, BOOST_RATIO_RATIO_DIVIDE_BY_0 , ());
+ BOOST_RATIO_STATIC_ASSERT(boost::detail::static_abs<N>::value >= 0, BOOST_RATIO_RATIO_NUMERATOR_IS_OUT_OF_RANGE, ());
+ BOOST_RATIO_STATIC_ASSERT(boost::detail::static_abs<D>::value > 0, BOOST_RATIO_RATIO_DENOMINATOR_IS_OUT_OF_RANGE, ());
+ BOOST_RATIO_STATIC_ASSERT(D != 0, BOOST_RATIO_RATIO_DIVIDE_BY_0 , ());
     static const boost::intmax_t m_na = boost::detail::static_abs<N>::value;
     static const boost::intmax_t m_da = boost::detail::static_abs<D>::value;
     static const boost::intmax_t m_s = boost::detail::static_sign<N>::value

Modified: sandbox/chrono/boost/stopwatches.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches.hpp (original)
+++ sandbox/chrono/boost/stopwatches.hpp 2010-06-27 05:57:22 EDT (Sun, 27 Jun 2010)
@@ -10,11 +10,11 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_STOPWATCHES__HPP
-#define BOOST_STOPWATCHES__HPP
+#ifndef BOOST_STOPWATCHES_HPP
+#define BOOST_STOPWATCHES_HPP
 
 //-----------------------------------------------------------------------------
 #include <boost/chrono/stopwatches.hpp>
 //-----------------------------------------------------------------------------
 
-#endif // BOOST_STOPWATCHES__HPP
+#endif // BOOST_STOPWATCHES_HPP

Modified: sandbox/chrono/boost/type_traits/common_type.hpp
==============================================================================
--- sandbox/chrono/boost/type_traits/common_type.hpp (original)
+++ sandbox/chrono/boost/type_traits/common_type.hpp 2010-06-27 05:57:22 EDT (Sun, 27 Jun 2010)
@@ -24,15 +24,27 @@
 #endif
 
 //----------------------------------------------------------------------------//
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND,MSG) \
- static_assert(CND, MSG)
+#ifndef BOOST_NO_STATIC_ASSERT
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_COMMON_TYPE_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) \
+ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#elif defined(BOOST_COMMON_TYPE_USES_ARRAY_ASSERT)
+#define BOOST_COMMON_TYPE_CONCAT(A,B) A##B
+#define BOOST_COMMON_TYPE_NAME(A,B) BOOST_COMMON_TYPE_CONCAT(A,B)
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_COMMON_TYPE_NAME(boost_common_type_test_,__LINE__)[CND];
 #else
-#include <boost/static_assert.hpp> // boost wonders never cease!
-#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND,MSG) \
- BOOST_STATIC_ASSERT(CND)
-#endif
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
 
+#if !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
+#define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type"
+#endif
 
 //----------------------------------------------------------------------------//
 // //
@@ -68,7 +80,7 @@
 
 #endif
     {
- BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, "must be complete type");
+ BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, "must be complete type",(T));
     public:
         typedef T type;
     };
@@ -83,8 +95,8 @@
     struct common_type<T, U, void>
 #endif
     {
- BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, "must be complete type");
- BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(U) > 0, "must be complete type");
+ BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, "must be complete type",(T));
+ BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(U) > 0, "must be complete type",(T));
         static bool m_f(); // workaround gcc bug; not required by std
 #if !defined(BOOST_NO_RVALUE_REFERENCES) \
     && !defined(BOOST_NO_DECLTYPE)


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