Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73031 - in sandbox/conversion/boost/conversion: . type_traits
From: vicente.botet_at_[hidden]
Date: 2011-07-12 23:50:23


Author: viboes
Date: 2011-07-12 23:50:23 EDT (Tue, 12 Jul 2011)
New Revision: 73031
URL: http://svn.boost.org/trac/boost/changeset/73031

Log:
conversion: move NO_IS_ASSIGNABLE macro from config.h file to is_assignable.hpp file
Text files modified:
   sandbox/conversion/boost/conversion/config.hpp | 5 -----
   sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp | 39 ++++++++++++++++++++++++++++++++++-----
   sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp | 26 ++++++++++++++------------
   3 files changed, 48 insertions(+), 22 deletions(-)

Modified: sandbox/conversion/boost/conversion/config.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/config.hpp (original)
+++ sandbox/conversion/boost/conversion/config.hpp 2011-07-12 23:50:23 EDT (Tue, 12 Jul 2011)
@@ -26,12 +26,10 @@
 #else
   #if ! defined(BOOST_NO_DECLTYPE)
     #if defined _MSC_VER
- #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
     #elif defined __clang__
          #define BOOST_CONVERSION_ENABLE_CND
     #elif defined __GNUC__
        #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
- #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
        #endif
        #define BOOST_CONVERSION_ENABLE_CND
     #else
@@ -42,14 +40,11 @@
        #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
     #elif defined __clang__
          #define BOOST_CONVERSION_ENABLE_CND
- //#define BOOST_CONVERSION_NO_IS_ASSIGNABLE
     #elif defined __GNUC__
        #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
- #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
        #endif
        #define BOOST_CONVERSION_ENABLE_CND
     #else
- #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
     #endif
   #endif
 #endif

Modified: sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp 2011-07-12 23:50:23 EDT (Tue, 12 Jul 2011)
@@ -15,11 +15,40 @@
 #ifndef BOOST_CONVERSION_TT_IS_ASSIGNABLE_HPP
 #define BOOST_CONVERSION_TT_IS_ASSIGNABLE_HPP
 
-#include <boost/conversion/config.hpp>
-#include <utility>
-#include <complex>
-#include <string>
-#include <boost/fusion/tuple.hpp>
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#define BOOST_CONVERSION_REQUIRES(CND) \
+ , typename enable_if_c< CND >::type
+
+#if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
+ //! Macro stating if the compiler don't support the features needed to define the @c is_assignable type trait.
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+#else
+ #if ! defined(BOOST_NO_DECLTYPE)
+ #if defined _MSC_VER
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #elif defined __clang__
+ #elif defined __GNUC__
+ #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #endif
+ #else
+ #endif
+ #else
+ #if defined _MSC_VER
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #elif defined __clang__
+ //#define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #elif defined __GNUC__
+ #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #endif
+ #else
+ #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
+ #endif
+ #endif
+#endif
 
 #if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
 namespace boost {

Modified: sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp 2011-07-12 23:50:23 EDT (Tue, 12 Jul 2011)
@@ -32,6 +32,14 @@
   template < class T, class... Args>
   struct is_constructible
   {};
+
+ //! Macro stating if the compiler doesn't support the features needed to define the @c is_constructible type trait.
+ #define BOOST_CONVERSION_NO_IS_CONSTRUCTIBLE
+ //! Macro stating if the compiler doesn't support the features needed to define the @c is_default_constructible type trait.
+ #define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
+ //! Max number of arguments to is_constructible when using variadic templates emulation.
+ #define BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX
+
 }
 #else
 
@@ -48,15 +56,9 @@
 #include <boost/utility/declval.hpp>
 #include <cstddef>
 
-// For specializations as there is a bug
-#include <utility>
-#include <boost/array.hpp>
-#include <complex>
-#include <vector>
-#include <boost/fusion/tuple.hpp>
 
-#ifndef BOOST_IS_CONSTRUCTIBLE_ARITY_MAX
-#define BOOST_IS_CONSTRUCTIBLE_ARITY_MAX 3
+#ifndef BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX
+#define BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX 3
 #endif
 
 namespace boost
@@ -73,7 +75,7 @@
         struct dummy;
     }
 
- template<class T, class A=void, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_IS_CONSTRUCTIBLE_ARITY_MAX, class A, = void BOOST_PP_INTERCEPT)>
+ template<class T, class A=void, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX, class A, = void BOOST_PP_INTERCEPT)>
     struct is_constructible;
 
 #ifndef BOOST_NO_SFINAE_EXPR
@@ -96,7 +98,7 @@
         typedef boost::integral_constant<bool,value> type; \
     };
 
- BOOST_PP_REPEAT(BOOST_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
+ BOOST_PP_REPEAT(BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
     #undef M0
     #undef M1
 
@@ -107,7 +109,7 @@
     { \
     };
 
- BOOST_PP_REPEAT(BOOST_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
+ BOOST_PP_REPEAT(BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
     #undef M0
 
 
@@ -122,7 +124,7 @@
     { \
     };
 
- BOOST_PP_REPEAT(BOOST_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
+ BOOST_PP_REPEAT(BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX, M0, ~)
     #undef M0
 
     #define BOOST_CONVERSION_NO_IS_CONSTRUCTIBLE


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