forked from boostorg/type_traits
Remove remaining occurances of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
These evaded scripting. [SVN r86249]
This commit is contained in:
@ -20,37 +20,6 @@ namespace boost {
|
||||
|
||||
namespace detail {
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES)
|
||||
|
||||
template <bool x>
|
||||
struct reference_adder
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct reference_adder<true>
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct add_reference_impl
|
||||
{
|
||||
typedef typename reference_adder<
|
||||
::boost::is_reference<T>::value
|
||||
>::template result_<T> 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
|
||||
|
@ -12,77 +12,8 @@
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// 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<spec> \
|
||||
{ \
|
||||
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 <boost/type_traits/detail/type_trait_undef.hpp>
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(bool)
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(char)
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
|
@ -14,8 +14,7 @@
|
||||
#include <boost/type_traits/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#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<T>::value)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
Reference in New Issue
Block a user