]> git.lyx.org Git - features.git/blobdiff - boost/boost/type_traits/has_new_operator.hpp
boost: update to 1.42.0
[features.git] / boost / boost / type_traits / has_new_operator.hpp
index 6d5351e080096bf2803a9503ce19dde94baad5cb..2c2c32228f26682ebf708aa46deec1a220151b5b 100644 (file)
@@ -26,7 +26,7 @@ namespace detail {
     template <typename T>
     struct has_new_operator_impl {
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::yes_type check_sig1(
             U*, 
             test<
             void *(*)(std::size_t),
@@ -34,7 +34,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::no_type check_sig1(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig2(
             U*, 
             test<
             void *(*)(std::size_t, const std::nothrow_t&),
@@ -42,7 +45,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::no_type check_sig2(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig3(
             U*, 
             test<
             void *(*)(std::size_t, void*),
@@ -50,10 +56,11 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::no_type check_sig(...);
+        static type_traits::no_type check_sig3(...);
+
 
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::yes_type check_sig4(
             U*, 
             test<
             void *(*)(std::size_t),
@@ -61,7 +68,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::no_type check_sig4(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig5(
             U*, 
             test<
             void *(*)(std::size_t, const std::nothrow_t&),
@@ -69,7 +79,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::no_type check_sig5(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig6(
             U*, 
             test<
             void *(*)(std::size_t, void*),
@@ -77,21 +90,29 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::no_type check_sig2(...);
+        static type_traits::no_type check_sig6(...);
 
         // GCC2 won't even parse this template if we embed the computation
         // of s1 in the computation of value.
         #ifdef __GNUC__
-            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl<T>::template check_sig<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl<T>::template check_sig1<T>(0)));
             BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl<T>::template check_sig2<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(has_new_operator_impl<T>::template check_sig3<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(has_new_operator_impl<T>::template check_sig4<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(has_new_operator_impl<T>::template check_sig5<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(has_new_operator_impl<T>::template check_sig6<T>(0)));
         #else
             #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
                 #pragma warning(push)
                 #pragma warning(disable:6334)
             #endif
 
-            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig1<T>(0)));
             BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(check_sig3<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(check_sig4<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(check_sig5<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(check_sig6<T>(0)));
 
             #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
                 #pragma warning(pop)
@@ -100,7 +121,11 @@ namespace detail {
         BOOST_STATIC_CONSTANT(bool, value = 
            (::boost::type_traits::ice_or<
             (s1 == sizeof(type_traits::yes_type)),
-            (s2 == sizeof(type_traits::yes_type))
+            (s2 == sizeof(type_traits::yes_type)),
+            (s3 == sizeof(type_traits::yes_type)),
+            (s4 == sizeof(type_traits::yes_type)),
+            (s5 == sizeof(type_traits::yes_type)),
+            (s6 == sizeof(type_traits::yes_type))
            >::value)
         );
     };