From ad10d46cc536e89695a4bf16c74f0d75bf54a71b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 11 Oct 2013 23:22:36 +0000 Subject: [PATCH] Remove remaining occurances of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION These evaded scripting. [SVN r86249] --- include/boost/type_traits/add_reference.hpp | 33 --------- .../type_traits/broken_compiler_spec.hpp | 69 ------------------- .../is_member_function_pointer.hpp | 5 +- 3 files changed, 2 insertions(+), 105 deletions(-) diff --git a/include/boost/type_traits/add_reference.hpp b/include/boost/type_traits/add_reference.hpp index 3fc7d94..5e3efca 100644 --- a/include/boost/type_traits/add_reference.hpp +++ b/include/boost/type_traits/add_reference.hpp @@ -20,37 +20,6 @@ namespace boost { namespace detail { -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES) - -template -struct reference_adder -{ - template struct result_ - { - typedef T& type; - }; -}; - -template <> -struct reference_adder -{ - template struct result_ - { - typedef T type; - }; -}; - -template -struct add_reference_impl -{ - typedef typename reference_adder< - ::boost::is_reference::value - >::template result_ result; - - typedef typename result::type type; -}; - -#else // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: @@ -78,8 +47,6 @@ struct add_reference_impl BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) -#endif - // these full specialisations are always required: BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS diff --git a/include/boost/type_traits/broken_compiler_spec.hpp b/include/boost/type_traits/broken_compiler_spec.hpp index cfe8603..d4f1990 100644 --- a/include/boost/type_traits/broken_compiler_spec.hpp +++ b/include/boost/type_traits/broken_compiler_spec.hpp @@ -12,77 +12,8 @@ #include #include -// these are needed regardless of BOOST_TT_NO_BROKEN_COMPILER_SPEC - -// agurt, 27/jun/03: disable the workaround if user defined -// BOOST_TT_NO_BROKEN_COMPILER_SPEC -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_TT_NO_BROKEN_COMPILER_SPEC) - # define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/ -#else - -// same as BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 macro, except that it -// never gets #undef-ined -# define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \ -template<> struct trait##_impl \ -{ \ - typedef result type; \ -}; \ -/**/ - -# define BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const volatile,T volatile) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T const volatile,T const) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_reference,T&,T) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T volatile) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const volatile) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T volatile*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const volatile*) \ - /**/ - -# define BOOST_TT_BROKEN_COMPILER_SPEC(T) \ - namespace boost { namespace detail { \ - typedef invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces \ - please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces; \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T volatile*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const volatile*) \ - }} \ - /**/ - -# include - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - BOOST_TT_BROKEN_COMPILER_SPEC(bool) BOOST_TT_BROKEN_COMPILER_SPEC(char) #ifndef BOOST_NO_INTRINSIC_WCHAR_T diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index 35a04b2..d1c3690 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -14,8 +14,7 @@ #include #include -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) // // Note: we use the "workaround" version for MSVC because it works for // __stdcall etc function types, where as the partial specialisation @@ -125,7 +124,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatil BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_member_function_pointer_impl::value) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#endif } // namespace boost