diff --git a/include/boost/type_traits/is_array.hpp b/include/boost/type_traits/is_array.hpp index 0dd1012..c381ca4 100644 --- a/include/boost/type_traits/is_array.hpp +++ b/include/boost/type_traits/is_array.hpp @@ -26,7 +26,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) @@ -41,45 +41,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const volatile[],t #endif #endif -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; -using ::boost::type_traits::wrap; - -template< typename T > T(* is_array_tester1(wrap) )(wrap); -char BOOST_TT_DECL is_array_tester1(...); - -template< typename T> no_type is_array_tester2(T(*)(wrap)); -yes_type BOOST_TT_DECL is_array_tester2(...); - -template< typename T > -struct is_array_impl -{ - BOOST_STATIC_CONSTANT(bool, value = - sizeof(::boost::detail::is_array_tester2( - ::boost::detail::is_array_tester1( - ::boost::type_traits::wrap() - ) - )) == 1 - ); -}; - -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index ac7ad1c..1a951bd 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -41,7 +41,7 @@ namespace boost { BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else namespace detail{ // @@ -80,69 +80,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false) #endif -#else - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -yes_type is_const_tester(const volatile void*); -no_type is_const_tester(volatile void *); - -template -struct is_const_helper - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_const_helper -{ - template struct result_ - { - static T* t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(t)) - )); - }; -}; - -template <> -struct is_const_helper -{ - template struct result_ - { - static T t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(&t)) - )); - }; -}; - -template -struct is_const_impl - : public is_const_helper< - is_reference::value - , is_array::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const volatile,true) #endif -} // namespace detail - -//* is a type T declared const - is_const -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/is_lvalue_reference.hpp b/include/boost/type_traits/is_lvalue_reference.hpp index 5d4e8e8..0b0130a 100644 --- a/include/boost/type_traits/is_lvalue_reference.hpp +++ b/include/boost/type_traits/is_lvalue_reference.hpp @@ -31,7 +31,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) @@ -46,52 +46,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volati BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) #endif -#else - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4181 4097) #endif -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; -using ::boost::type_traits::wrap; - -template T&(* is_lvalue_reference_helper1(wrap) )(wrap); -char is_lvalue_reference_helper1(...); - -template no_type is_lvalue_reference_helper2(T&(*)(wrap)); -yes_type is_lvalue_reference_helper2(...); - -template -struct is_lvalue_reference_impl -{ - BOOST_STATIC_CONSTANT( - bool, value = sizeof( - ::boost::detail::is_lvalue_reference_helper2( - ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap()))) == 1 - ); -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false) -#endif - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl::value) - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/is_member_pointer.hpp b/include/boost/type_traits/is_member_pointer.hpp index a4a6d25..823c23a 100644 --- a/include/boost/type_traits/is_member_pointer.hpp +++ b/include/boost/type_traits/is_member_pointer.hpp @@ -46,7 +46,7 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) @@ -56,59 +56,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer, BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true) #endif -#else // no partial template specialization - -namespace detail { - -template -::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*const volatile*); -::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...); - -template -struct is_member_pointer_select - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_member_pointer_select -{ - template struct result_ - { - static T* make_t(); - BOOST_STATIC_CONSTANT( - bool, value = - (::boost::type_traits::ice_or< - (1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(make_t()))), - (1 == sizeof(is_member_pointer_tester(make_t()))) - >::value) ); - }; -}; - -template -struct is_member_pointer_impl - : public is_member_pointer_select< - ::boost::type_traits::ice_or< - ::boost::is_reference::value - , ::boost::is_array::value - >::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl::value) - -#endif // __BORLANDC__ - } // namespace boost #include diff --git a/include/boost/type_traits/is_pointer.hpp b/include/boost/type_traits/is_pointer.hpp index b0b26a4..aad30f2 100644 --- a/include/boost/type_traits/is_pointer.hpp +++ b/include/boost/type_traits/is_pointer.hpp @@ -35,7 +35,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else namespace detail { @@ -79,62 +79,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false) #endif -#else // no partial template specialization - -namespace detail { - -struct pointer_helper -{ - pointer_helper(const volatile void*); -}; - -yes_type BOOST_TT_DECL is_pointer_tester(pointer_helper); -no_type BOOST_TT_DECL is_pointer_tester(...); - -template -struct is_pointer_select - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_pointer_select -{ - template struct result_ - { - static T& make_t(); - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - (1 == sizeof(is_pointer_tester(make_t()))), - (1 == sizeof(type_traits::is_function_ptr_tester(make_t()))) - >::value)); - }; -}; - -template -struct is_pointer_impl - : public is_pointer_select< - ::boost::type_traits::ice_or< - ::boost::is_reference::value - , ::boost::is_array::value - >::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index b0458f4..834b6f1 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -59,7 +59,7 @@ struct is_volatile_rval_filter #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else //* is a type T declared volatile - is_volatile BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter::value) @@ -75,69 +75,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& volatile,false BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false) #endif -#else - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -yes_type is_volatile_tester(void const volatile*); -no_type is_volatile_tester(void const*); - -template -struct is_volatile_helper - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_volatile_helper -{ - template struct result_ - { - static T* t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(t)) - )); - }; -}; - -template <> -struct is_volatile_helper -{ - template struct result_ - { - static T t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(&t)) - )); - }; -}; - -template -struct is_volatile_impl - : public is_volatile_helper< - is_reference::value - , is_array::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const volatile,true) #endif -} // namespace detail - -//* is a type T declared volatile - is_volatile -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/remove_pointer.hpp b/include/boost/type_traits/remove_pointer.hpp index f1bdd91..fef7068 100644 --- a/include/boost/type_traits/remove_pointer.hpp +++ b/include/boost/type_traits/remove_pointer.hpp @@ -66,7 +66,7 @@ namespace detail{ BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2::type) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) @@ -74,10 +74,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T) -#else - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl::type) - #endif } // namespace boost