forked from boostorg/type_traits
make implementation less stressful for MSVC 6.5/7.0
[SVN r17599]
This commit is contained in:
@@ -55,17 +55,20 @@ struct add_reference_impl
|
||||
typedef typename result::type type;
|
||||
};
|
||||
|
||||
// these full specialisations are always required:
|
||||
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const,void const)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void volatile,void volatile)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const volatile)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl<T>::type)
|
||||
|
||||
#else
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
//
|
||||
// these full specialisations are always required:
|
||||
BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void,void)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
@@ -74,6 +77,11 @@ BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void volatile,void volatile)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const volatile,void const volatile)
|
||||
#endif
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include "boost/type_traits/detail/type_trait_undef.hpp"
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
|
||||
#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
|
||||
|
||||
#include "boost/mpl/aux_/lambda_support.hpp"
|
||||
#include "boost/config.hpp"
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
@@ -16,19 +17,17 @@
|
||||
|
||||
#else
|
||||
|
||||
namespace boost {
|
||||
// forward declarations
|
||||
template< typename T > struct remove_const;
|
||||
template< typename T > struct remove_volatile;
|
||||
template< typename T > struct remove_cv;
|
||||
template< typename T > struct remove_pointer;
|
||||
template< typename T > struct remove_reference;
|
||||
}
|
||||
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; };
|
||||
}}
|
||||
|
||||
// same as BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1 macro, except that it
|
||||
// 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<spec> \
|
||||
template<> struct trait##_impl<spec> \
|
||||
{ \
|
||||
typedef result type; \
|
||||
}; \
|
||||
@@ -39,9 +38,6 @@ template<> struct trait<spec> \
|
||||
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) \
|
||||
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const,T) \
|
||||
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T volatile,T) \
|
||||
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const volatile,T) \
|
||||
/**/
|
||||
|
||||
# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \
|
||||
@@ -69,14 +65,14 @@ template<> struct trait<spec> \
|
||||
/**/
|
||||
|
||||
# define BOOST_TT_BROKEN_COMPILER_SPEC(T) \
|
||||
namespace boost { \
|
||||
namespace boost { namespace detail { \
|
||||
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"
|
||||
@@ -98,7 +94,7 @@ BOOST_TT_BROKEN_COMPILER_SPEC(signed long)
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(unsigned long)
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(float)
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(double)
|
||||
BOOST_TT_BROKEN_COMPILER_SPEC(long double)
|
||||
//BOOST_TT_BROKEN_COMPILER_SPEC(long double)
|
||||
|
||||
// for backward compatibility
|
||||
#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \
|
||||
|
@@ -87,6 +87,20 @@ template<> struct trait< sp1,sp2 > \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \
|
||||
template<> struct trait##_impl< sp > \
|
||||
{ \
|
||||
BOOST_STATIC_CONSTANT(bool, value = (C)); \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \
|
||||
template<> struct trait##_impl< sp1,sp2 > \
|
||||
{ \
|
||||
BOOST_STATIC_CONSTANT(bool, value = (C)); \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \
|
||||
template< param > struct trait< sp > \
|
||||
BOOST_TT_AUX_BOOL_C_BASE(C) \
|
||||
@@ -120,6 +134,13 @@ template< param1, param2 > struct trait< sp1,sp2 > \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
|
||||
template< param > struct trait##_impl< sp1,sp2 > \
|
||||
{ \
|
||||
BOOST_STATIC_CONSTANT(bool, value = (C)); \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#ifndef BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \
|
||||
|
@@ -22,8 +22,11 @@
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1
|
||||
|
@@ -37,6 +37,13 @@ template<> struct trait<spec> \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
|
||||
template<> struct trait##_impl<spec> \
|
||||
{ \
|
||||
typedef result type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
|
||||
template< param > struct trait<spec> \
|
||||
{ \
|
||||
|
@@ -18,5 +18,6 @@
|
||||
|
||||
#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
|
||||
#undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1
|
||||
#undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1
|
||||
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
|
||||
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2
|
||||
|
@@ -59,15 +59,16 @@ struct is_array_impl
|
||||
);
|
||||
};
|
||||
|
||||
#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<T>::value)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const volatile,false)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -102,16 +102,17 @@ struct is_const_impl
|
||||
{
|
||||
};
|
||||
|
||||
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<T>
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const volatile,true)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -75,7 +75,7 @@ struct does_conversion_exist<void>
|
||||
};
|
||||
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_impl
|
||||
struct is_convertible_basic_impl
|
||||
: does_conversion_exist<From>::template result_<To>
|
||||
{
|
||||
};
|
||||
@@ -121,7 +121,7 @@ template <typename T> struct checker
|
||||
};
|
||||
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_impl
|
||||
struct is_convertible_basic_impl
|
||||
{
|
||||
static From _m_from;
|
||||
static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
|
||||
@@ -145,7 +145,7 @@ struct any_conversion
|
||||
};
|
||||
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_impl
|
||||
struct is_convertible_basic_impl
|
||||
{
|
||||
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
|
||||
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
|
||||
@@ -163,7 +163,7 @@ struct is_convertible_impl
|
||||
// however it does rely on undefined behaviour by passing UDT's through (...).
|
||||
//
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_impl
|
||||
struct is_convertible_basic_impl
|
||||
{
|
||||
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
|
||||
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
|
||||
@@ -176,26 +176,20 @@ struct is_convertible_impl
|
||||
|
||||
#endif // is_convertible_impl
|
||||
|
||||
#if !defined(__BORLANDC__) || __BORLANDC__ > 0x551
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_forwarder
|
||||
struct is_convertible_impl
|
||||
{
|
||||
typedef typename add_reference<From>::type ref_type;
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
(::boost::type_traits::ice_and<
|
||||
::boost::detail::is_convertible_impl<ref_type,To>::value,
|
||||
::boost::detail::is_convertible_basic_impl<ref_type,To>::value,
|
||||
::boost::type_traits::ice_not<
|
||||
::boost::is_array<To>::value
|
||||
>::value
|
||||
>::value)
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
|
||||
#else
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_forwarder<From,To>::value))
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -203,25 +197,12 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convert
|
||||
// for void types, these are common to all the
|
||||
// implementation above:
|
||||
//
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
|
||||
#endif
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 volatile,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const volatile,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \
|
||||
/**/
|
||||
|
||||
# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \
|
||||
@@ -237,9 +218,26 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void c
|
||||
# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1
|
||||
|
||||
#else
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,void,void,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true)
|
||||
#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
|
||||
#endif
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
@@ -287,5 +285,3 @@ TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(long double)
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
||||
#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
|
||||
|
||||
|
||||
|
@@ -188,17 +188,17 @@ template <typename T> struct is_empty_impl
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
// these help when the compiler has no partial specialization support:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const volatile,false)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl<T>::value)
|
||||
// these help when the compiler has no partial specialization support:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty,void const volatile,false)
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
@@ -91,22 +91,22 @@ template <typename T> struct is_enum_impl
|
||||
BOOST_STATIC_CONSTANT(bool, value = helper::value);
|
||||
};
|
||||
|
||||
// Specializations suppress some nasty warnings with GCC
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,float,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,double,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,long double,false)
|
||||
// these help on compilers with no partial specialization support:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const volatile,false)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,::boost::detail::is_enum_impl<T>::value)
|
||||
|
||||
// Specializations suppress some nasty warnings with GCC
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,float,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,double,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,long double,false)
|
||||
// these help on compilers with no partial specialization support:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,void const volatile,false)
|
||||
#endif
|
||||
|
||||
#else // __BORLANDC__
|
||||
//
|
||||
// buggy is_convertible prevents working
|
||||
|
@@ -39,18 +39,18 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(
|
||||
|
||||
#else
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
template <bool>
|
||||
struct is_member_function_pointer_select
|
||||
struct is_mem_fun_pointer_select
|
||||
: ::boost::type_traits::false_result
|
||||
{
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_member_function_pointer_select<false>
|
||||
struct is_mem_fun_pointer_select<false>
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
@@ -65,8 +65,8 @@ struct is_member_function_pointer_select<false>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_mem_fun_pointer_impl
|
||||
: is_member_function_pointer_select<
|
||||
struct is_member_function_pointer_impl
|
||||
: is_mem_fun_pointer_select<
|
||||
::boost::type_traits::ice_or<
|
||||
::boost::is_reference<T>::value
|
||||
, ::boost::is_array<T>::value
|
||||
@@ -75,14 +75,10 @@ struct is_mem_fun_pointer_impl
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#else // Borland C++
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct is_mem_fun_pointer_impl
|
||||
struct is_member_function_pointer_impl
|
||||
{
|
||||
static T& m_t;
|
||||
BOOST_STATIC_CONSTANT(
|
||||
@@ -91,22 +87,23 @@ struct is_mem_fun_pointer_impl
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_mem_fun_pointer_impl<T&>
|
||||
struct is_member_function_pointer_impl<T&>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatile,false)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_mem_fun_pointer_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const volatile,false)
|
||||
#endif
|
||||
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
|
||||
|
||||
|
@@ -77,15 +77,16 @@ struct is_member_pointer_impl
|
||||
{
|
||||
};
|
||||
|
||||
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<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const volatile,false)
|
||||
#endif
|
||||
|
||||
#endif // __BORLANDC__
|
||||
|
||||
|
@@ -23,14 +23,14 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
// forward declaration, needed by 'is_POD_array_helper' template below
|
||||
// forward declaration, needed by 'is_pod_array_helper' template below
|
||||
template< typename T > struct is_POD;
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template <typename T> struct is_POD_impl
|
||||
template <typename T> struct is_pod_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value =
|
||||
@@ -42,15 +42,15 @@ template <typename T> struct is_POD_impl
|
||||
};
|
||||
|
||||
template <typename T, std::size_t sz>
|
||||
struct is_POD_impl<T[sz]>
|
||||
: is_POD_impl<T>
|
||||
struct is_pod_impl<T[sz]>
|
||||
: is_pod_impl<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <bool is_array = false>
|
||||
struct is_POD_helper
|
||||
struct is_pod_helper
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
@@ -77,7 +77,7 @@ struct bool_to_yes_no_type<true>
|
||||
};
|
||||
|
||||
template <typename ArrayType>
|
||||
struct is_POD_array_helper
|
||||
struct is_pod_array_helper
|
||||
{
|
||||
enum { is_pod = ::boost::is_POD<ArrayType>::value }; // MSVC workaround
|
||||
typedef typename bool_to_yes_no_type<is_pod>::type type;
|
||||
@@ -85,10 +85,10 @@ struct is_POD_array_helper
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
is_POD_array_helper<T> is_POD_array(T*);
|
||||
is_pod_array_helper<T> is_POD_array(T*);
|
||||
|
||||
template <>
|
||||
struct is_POD_helper<true>
|
||||
struct is_pod_helper<true>
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
@@ -100,11 +100,11 @@ struct is_POD_helper<true>
|
||||
};
|
||||
|
||||
|
||||
template <typename T> struct is_POD_impl
|
||||
template <typename T> struct is_pod_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = (
|
||||
::boost::detail::is_POD_helper<
|
||||
::boost::detail::is_pod_helper<
|
||||
::boost::is_array<T>::value
|
||||
>::template result_<T>::value
|
||||
)
|
||||
@@ -113,20 +113,20 @@ template <typename T> struct is_POD_impl
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_POD_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::is_POD<T>::value)
|
||||
|
||||
// the following help compilers without partial specialization support:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void,true)
|
||||
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void const,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void volatile,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void const volatile,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void volatile,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::is_POD<T>::value)
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
@@ -70,14 +70,10 @@ struct is_pointer_impl
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(__COMO__)
|
||||
template <class T> struct is_pointer<T&>
|
||||
{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T> struct is_pointer<T&const>
|
||||
{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T> struct is_pointer<T&volatile>
|
||||
{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T> struct is_pointer<T&const volatile>
|
||||
{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T&,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const,false)
|
||||
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
|
||||
@@ -123,17 +119,17 @@ struct is_pointer_impl
|
||||
{
|
||||
};
|
||||
|
||||
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<T>::value)
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const volatile,false)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
} // namespace boost
|
||||
|
@@ -86,15 +86,16 @@ struct is_reference_impl
|
||||
);
|
||||
};
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const volatile,false)
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const volatile,false)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
|
@@ -92,16 +92,17 @@ struct is_volatile_impl
|
||||
{
|
||||
};
|
||||
|
||||
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<T>
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void,false)
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void volatile,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const volatile,true)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -60,7 +60,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T
|
||||
|
||||
#else
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,T)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename detail::remove_const_impl<T>::type)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -33,8 +33,17 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T con
|
||||
|
||||
#else
|
||||
|
||||
// doesn't work
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,T)
|
||||
namespace detail {
|
||||
template <typename T>
|
||||
struct remove_cv_impl
|
||||
{
|
||||
typedef typename remove_volatile_impl<
|
||||
typename remove_const_impl<T>::type
|
||||
>::type type;
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::remove_cv_impl<T>::type)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -18,13 +18,18 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
|
||||
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 detail::remove_pointer_impl<T>::type)
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
@@ -18,9 +18,9 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
@@ -33,6 +33,10 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,
|
||||
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename detail::remove_reference_impl<T>::type)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
} // namespace boost
|
||||
|
@@ -59,8 +59,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile
|
||||
|
||||
#else
|
||||
|
||||
// doesn't work
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,T)
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
@@ -80,18 +80,17 @@ struct is_aligned
|
||||
);
|
||||
};
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::max_align,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<1> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<2> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<4> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<8> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<10> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<16> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<32> ,true)
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::max_align,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,detail::lower_alignment<1> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<2> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<4> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<8> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<10> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<16> ,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::detail::lower_alignment<32> ,true)
|
||||
|
||||
|
||||
// This alignment method originally due to Brian Parker, implemented by David
|
||||
// Abrahams, and then ported here by Doug Gregor.
|
||||
template <int Align>
|
||||
@@ -134,10 +133,13 @@ struct a8{ double s; };
|
||||
struct a16{ long double s; };
|
||||
#pragma option pop
|
||||
}
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::align::a2,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::align::a4,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::align::a8,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pod,::boost::align::a16,true)
|
||||
|
||||
namespace detail {
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true)
|
||||
}
|
||||
|
||||
template <std::size_t N> struct type_with_alignment
|
||||
{
|
||||
|
Reference in New Issue
Block a user