diff --git a/include/boost/type_traits/broken_compiler_spec.hpp b/include/boost/type_traits/broken_compiler_spec.hpp index 842b053..277e9c9 100644 --- a/include/boost/type_traits/broken_compiler_spec.hpp +++ b/include/boost/type_traits/broken_compiler_spec.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001 Aleksey Gurtovoy. +// Copyright (c) 2001-2003 Aleksey Gurtovoy. // Permission to copy, use, modify, sell and distribute this software is // granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -11,18 +11,24 @@ #include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -# define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/ - -#else - +// these are needed regardless of BOOST_TT_NO_BROKEN_COMPILER_SPEC +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace boost { namespace detail { template< typename T > struct remove_const_impl { typedef T type; }; template< typename T > struct remove_volatile_impl { typedef T type; }; template< typename T > struct remove_pointer_impl { typedef T type; }; template< typename T > struct remove_reference_impl { typedef T type; }; }} +#endif + +// 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 @@ -42,9 +48,9 @@ template<> struct trait##_impl \ # 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_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) \ /**/