Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73726 - sandbox/conversion/boost/conversion/type_traits
From: vicente.botet_at_[hidden]
Date: 2011-08-14 06:22:30


Author: viboes
Date: 2011-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
New Revision: 73726
URL: http://svn.boost.org/trac/boost/changeset/73726

Log:
conversion: update some traits
Text files modified:
   sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp | 9 +++++++--
   sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp | 2 ++
   sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp | 6 ++++--
   sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp | 4 ++--
   sandbox/conversion/boost/conversion/type_traits/is_move_assignable.hpp | 6 ++++--
   sandbox/conversion/boost/conversion/type_traits/is_move_constructible.hpp | 4 ++--
   6 files changed, 21 insertions(+), 10 deletions(-)

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-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -61,6 +61,7 @@
     //#define BOOST_CONVERSION_NO_IS_ASSIGNABLE
   #elif defined __GNUC__
      #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+#error
        #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
      #else
        #define BOOST_CONVERSION_IS_ASSIGNABLE_USES_DECLTYPE
@@ -125,7 +126,11 @@
           static false_type
           selector(...);
 
- typedef decltype(selector<T,S>(0)) type;
+ static const bool value =
+ sizeof(selector<T,S>(0)) ==
+ sizeof(yes_type);
+ typedef boost::integral_constant<bool,value> type;
+ //typedef decltype(selector<T,S>(0)) type;
         };
 
 #elif defined BOOST_CONVERSION_IS_ASSIGNABLE_USES_SIZEOF
@@ -207,7 +212,7 @@
         template <> struct imp< int, unsigned char, false, false > : true_type {};
         template <> struct imp< int, short, false, false > : true_type {};
         template <> struct imp< int, unsigned short, false, false > : true_type {};
- template <> struct imp< int, int, false, false > : true_type {};
+ //template <> struct imp< int, int, false, false > : true_type {};
         template <> struct imp< int, unsigned int, false, false > : true_type {};
         template <> struct imp< int, long, false, false > : true_type {};
         template <> struct imp< int, unsigned long, false, false > : true_type {};

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-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -86,6 +86,7 @@
   #elif defined __GNUC__
      #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
        #if ! defined BOOST_NO_SFINAE_EXPR
+#error
          #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_SIZEOF
        #else
          #define BOOST_CONVERSION_NO_IS_CONSTRUCTIBLE
@@ -102,6 +103,7 @@
   #if defined __clang__
   #elif defined __GNUC__
      #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 7 )
+#error
        #define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
      #endif
   #endif

Modified: sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp 2011-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -44,8 +44,10 @@
    */
   template <typename T>
   struct is_copy_assignable<T&> : true_type {};
- template <typename A>
- struct is_copy_assignable<A[]> : false_type {};
+ template <typename T>
+ struct is_copy_assignable<T[]> : false_type {};
+ template <typename T, std::size_t N>
+ struct is_copy_assignable<T[N]> : false_type {};
   template <>
   struct is_copy_assignable<void> : false_type {};
 

Modified: sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp 2011-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -45,8 +45,8 @@
   struct is_copy_constructible<T&> : true_type {};
   template <typename T>
   struct is_copy_constructible<T[]> : false_type {};
-// template <typename T, std::size_t N>
-// struct is_copy_constructible<T[N]> : false_type {};
+ template <typename T, std::size_t N>
+ struct is_copy_constructible<T[N]> : false_type {};
 #endif
 
 }

Modified: sandbox/conversion/boost/conversion/type_traits/is_move_assignable.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_move_assignable.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_move_assignable.hpp 2011-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -67,8 +67,10 @@
    */
 // template <typename T>
 // struct is_move_assignable<T&> : true_type {};
- template <typename A>
- struct is_move_assignable<A[]> : false_type {};
+ template <typename T>
+ struct is_move_assignable<T[]> : false_type {};
+ template <typename T, std::size_t N>
+ struct is_move_assignable<T[N]> : false_type {};
   template <>
   struct is_move_assignable<void> : false_type {};
 

Modified: sandbox/conversion/boost/conversion/type_traits/is_move_constructible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_move_constructible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_move_constructible.hpp 2011-08-14 06:22:29 EDT (Sun, 14 Aug 2011)
@@ -65,8 +65,8 @@
 // struct is_move_constructible<T&> : true_type {};
   template <typename T>
   struct is_move_constructible<T[]> : false_type {};
-// template <typename T, std::size_t N>
-// struct is_move_constructible<T[N]> : false_type {};
+ template <typename T, std::size_t N>
+ struct is_move_constructible<T[N]> : false_type {};
 #endif
 
 }


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