Bring MPL v2 to the main trunk

[SVN r15347]
This commit is contained in:
Dave Abrahams
2002-09-15 22:13:24 +00:00
parent d42475aa35
commit 8ab81a2e6a
87 changed files with 5181 additions and 3694 deletions

View File

@ -4,39 +4,59 @@
// warranty, and with no claim as to its suitability for any purpose.
// See http://www.boost.org for most recent version including documentation.
// See boost/type_traits/*.hpp for full copyright notices.
#ifndef BOOST_TYPE_TRAITS_HPP
#define BOOST_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#include <boost/type_traits/ice.hpp>
#include <boost/type_traits/conversion_traits.hpp>
#include <boost/type_traits/arithmetic_traits.hpp>
#include <boost/type_traits/cv_traits.hpp>
#include <boost/type_traits/composite_traits.hpp>
#include <boost/type_traits/alignment_traits.hpp>
#include <boost/type_traits/object_traits.hpp>
#include <boost/type_traits/transform_traits.hpp>
#include <boost/type_traits/same_traits.hpp>
#include <boost/type_traits/function_traits.hpp>
/**************************************************************************/
//
// undefine helper macro's:
//
#undef BOOST_IS_CLASS
#undef BOOST_IS_ENUM
#undef BOOST_IS_UNION
#undef BOOST_IS_POD
#undef BOOST_IS_EMPTY
#undef BOOST_HAS_TRIVIAL_CONSTRUCTOR
#undef BOOST_HAS_TRIVIAL_COPY
#undef BOOST_HAS_TRIVIAL_ASSIGN
#undef BOOST_HAS_TRIVIAL_DESTRUCTOR
#include "boost/type_traits/add_const.hpp"
#include "boost/type_traits/add_cv.hpp"
#include "boost/type_traits/add_pointer.hpp"
#include "boost/type_traits/add_reference.hpp"
#include "boost/type_traits/add_volatile.hpp"
#include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/has_nothrow_assign.hpp"
#include "boost/type_traits/has_nothrow_constructor.hpp"
#include "boost/type_traits/has_nothrow_copy.hpp"
#include "boost/type_traits/has_nothrow_destructor.hpp"
#include "boost/type_traits/has_trivial_assign.hpp"
#include "boost/type_traits/has_trivial_constructor.hpp"
#include "boost/type_traits/has_trivial_copy.hpp"
#include "boost/type_traits/has_trivial_destructor.hpp"
#include "boost/type_traits/is_arithmetic.hpp"
#include "boost/type_traits/is_array.hpp"
#include "boost/type_traits/is_base_and_derived.hpp"
#include "boost/type_traits/is_class.hpp"
#include "boost/type_traits/is_compound.hpp"
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_enum.hpp"
#include "boost/type_traits/is_float.hpp"
#include "boost/type_traits/is_function.hpp"
#include "boost/type_traits/is_fundamental.hpp"
#include "boost/type_traits/is_integral.hpp"
#include "boost/type_traits/is_member_function_pointer.hpp"
#include "boost/type_traits/is_member_pointer.hpp"
#include "boost/type_traits/is_object.hpp"
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/is_pointer.hpp"
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/is_same.hpp"
#include "boost/type_traits/is_scalar.hpp"
#include "boost/type_traits/is_stateless.hpp"
#include "boost/type_traits/is_union.hpp"
#include "boost/type_traits/is_void.hpp"
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/remove_bounds.hpp"
#include "boost/type_traits/remove_const.hpp"
#include "boost/type_traits/remove_cv.hpp"
#include "boost/type_traits/remove_pointer.hpp"
#include "boost/type_traits/remove_reference.hpp"
#include "boost/type_traits/remove_volatile.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
#endif // BOOST_TYPE_TRAITS_HPP

View File

@ -0,0 +1,48 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED
#define BOOST_TT_ADD_CONST_HPP_INCLUDED
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
// * convert a type T to const type - add_const<T>
// this is not required since the result is always
// the same as "T const", but it does suppress warnings
// from some compilers:
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_const is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const)
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&)
#endif
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED

View File

@ -0,0 +1,48 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_ADD_CV_HPP_INCLUDED
#define BOOST_TT_ADD_CV_HPP_INCLUDED
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
// * convert a type T to a const volatile type - add_cv<T>
// this is not required since the result is always
// the same as "T const volatile", but it does suppress warnings
// from some compilers:
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_volatile is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile)
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&)
#endif
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_ADD_CV_HPP_INCLUDED

View File

@ -0,0 +1,37 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED
#define BOOST_TT_ADD_POINTER_HPP_INCLUDED
#include "boost/type_traits/remove_reference.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct add_pointer_impl
{
typedef typename remove_reference<T>::type no_ref_type;
typedef no_ref_type* type;
};
} // namespace detail
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl<T>::type)
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED

View File

@ -0,0 +1,81 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
#include "boost/type_traits/is_reference.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
#elif defined(BOOST_MSVC6_MEMBER_TEMPLATES)
namespace detail {
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;
};
} // 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
BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const,void const)
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
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED

View File

@ -0,0 +1,48 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
#define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
// * convert a type T to volatile type - add_volatile<T>
// this is not required since the result is always
// the same as "T volatile", but it does suppress warnings
// from some compilers:
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_volatile is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile)
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&)
#endif
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED

View File

@ -0,0 +1,85 @@
// (C) Copyright John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
#ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
#define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
#include "boost/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/size_t_trait_def.hpp"
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4121) // alignment is sensitive to packing
#endif
namespace boost {
template <typename T> struct alignment_of;
// get the alignment of some arbitrary type:
namespace detail {
template <typename T>
struct alignment_of_hack
{
char c;
T t;
alignment_of_hack();
};
template <unsigned A, unsigned S>
struct alignment_logic
{
BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S);
};
template< typename T >
struct alignment_of_impl
{
BOOST_STATIC_CONSTANT(std::size_t, value =
(::boost::detail::alignment_logic<
sizeof(detail::alignment_of_hack<T>) - sizeof(T),
sizeof(T)
>::value));
};
} // namespace detail
BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl<T>::value)
// references have to be treated specially, assume
// that a reference is just a special pointer:
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct alignment_of<T&>
: alignment_of<T*>
{
};
#endif
// void has to be treated specially:
BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void,0)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const,0)
BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void volatile,0)
BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const volatile,0)
#endif
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#include "boost/type_traits/detail/size_t_trait_undef.hpp"
#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED

View File

@ -5,204 +5,10 @@
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
// defines alignment_of:
#ifndef BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED
#define BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED
#ifndef ALIGNMENT_TYPE_TRAITS_HPP
#define ALIGNMENT_TYPE_TRAITS_HPP
#include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
#include <cstdlib>
#include <cstddef>
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#include <boost/preprocessor/list/for_each_i.hpp>
#include <boost/preprocessor/tuple/to_list.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/transform_traits.hpp>
#include <boost/static_assert.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4121) // alignment is sensitive to packing
#endif
namespace boost{
template <class T> struct alignment_of;
//
// get the alignment of some arbitrary type:
namespace detail{
template <class T>
struct alignment_of_hack
{
char c;
T t;
alignment_of_hack();
};
template <unsigned A, unsigned S>
struct alignment_logic
{
BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S);
};
} // namespace detail
template <class T>
struct alignment_of
{
BOOST_STATIC_CONSTANT(std::size_t, value =
(::boost::detail::alignment_logic<
sizeof(detail::alignment_of_hack<T>) - sizeof(T),
sizeof(T)
>::value));
};
//
// references have to be treated specially, assume
// that a reference is just a special pointer:
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
struct alignment_of<T&>
{
public:
BOOST_STATIC_CONSTANT(std::size_t, value = ::boost::alignment_of<T*>::value);
};
#endif
//
// void has to be treated specially:
template <>
struct alignment_of<void>
{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); };
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct alignment_of<const void>
{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); };
template <>
struct alignment_of<volatile void>
{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); };
template <>
struct alignment_of<const volatile void>
{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); };
#endif
namespace detail {
class alignment_dummy;
typedef void (*function_ptr)();
typedef int (alignment_dummy::*member_ptr);
typedef int (alignment_dummy::*member_function_ptr)();
/*
* The ct_if implementation is temporary code. It will be replaced with MPL
* in the future...
*/
struct select_then
{
template<typename Then, typename Else>
struct result
{
typedef Then type;
};
};
struct select_else
{
template<typename Then, typename Else>
struct result
{
typedef Else type;
};
};
template<bool Condition>
struct ct_if_selector
{
typedef select_then type;
};
template<>
struct ct_if_selector<false>
{
typedef select_else type;
};
template<bool Condition, typename Then, typename Else>
struct ct_if
{
typedef typename ct_if_selector<Condition>::type select;
typedef typename select::template result<Then,Else>::type type;
};
#define BOOST_TT_ALIGNMENT_TYPES BOOST_PP_TUPLE_TO_LIST( \
11, ( \
char, short, int, long, float, double, long double \
, void*, function_ptr, member_ptr, member_function_ptr))
#define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \
typename ct_if< \
alignment_of<T>::value <= target, T, char>::type BOOST_PP_CAT(t,I);
#define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I);
template <std::size_t target>
union min_alignment
{
BOOST_PP_LIST_FOR_EACH_I(
BOOST_TT_CHOOSE_MIN_ALIGNMENT
, ignored, BOOST_TT_ALIGNMENT_TYPES)
};
union max_align
{
BOOST_PP_LIST_FOR_EACH_I(
BOOST_TT_CHOOSE_T
, ignored, BOOST_TT_ALIGNMENT_TYPES)
};
#undef BOOST_TT_ALIGNMENT_TYPES
#undef BOOST_TT_CHOOSE_MIN_ALIGNMENT
#undef BOOST_TT_CHOOSE_T
template<int TAlign, int Align>
struct is_aligned
{
BOOST_STATIC_CONSTANT(bool,
value = (TAlign >= Align) & (TAlign % Align == 0));
};
}
// This alignment method originally due to Brian Parker, implemented by David
// Abrahams, and then ported here by Doug Gregor.
template <int Align>
class type_with_alignment
{
typedef detail::min_alignment<Align> t1;
typedef type_with_alignment<Align> this_type;
typedef typename detail::ct_if<
(detail::is_aligned<(alignment_of<t1>::value), Align>::value)
, t1
, detail::max_align
>::type align_t;
BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of<align_t>::value);
BOOST_STATIC_ASSERT(found >= Align);
BOOST_STATIC_ASSERT(found % Align == 0);
public:
typedef align_t type;
};
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#endif // ALIGNMENT_TYPE_TRAITS_HPP
#endif // BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED

View File

@ -8,259 +8,14 @@
//
// defines traits classes for arithmetic types:
// is_void, is_integral, is_float, is_arithmetic, is_fundamental.
//
// Revision History:
// Feb 19 2001 Added #include <climits> (David Abrahams)
#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP
#define BOOST_ARITHMETIC_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#include <limits.h> // for ULLONG_MAX/ULONG_LONG_MAX
namespace boost{
//* is a type T void - is_void<T>
template <typename T> struct is_void{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <> struct is_void<void>{ BOOST_STATIC_CONSTANT(bool, value = true); };
//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
// as an extention we include long long, as this is likely to be added to the
// standard at a later date
template <typename T> struct is_integral
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <> struct is_integral<unsigned char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<unsigned short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<unsigned int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<unsigned long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<signed char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<signed short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<signed int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<signed long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template <> struct is_integral<wchar_t>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
template <> struct is_integral<bool>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
# if defined(BOOST_HAS_LONG_LONG)
template <> struct is_integral<unsigned long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#elif defined(BOOST_HAS_MS_INT64)
template <> struct is_integral<unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<__int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
//* is a type T a floating-point type described in the standard (3.9.1p8)
template <typename T> struct is_float
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <> struct is_float<float>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<long double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
//
// declare cv-qualified specialisations of these templates only
// if BOOST_NO_CV_SPECIALIZATIONS is not defined:
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct is_void<const void>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_void<volatile void>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_void<const volatile void>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#ifndef BOOST_NO_CV_SPECIALIZATIONS
// const-variations:
template <> struct is_integral<const unsigned char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const unsigned short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const unsigned int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const unsigned long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const signed char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const signed short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const signed int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const signed long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template <> struct is_integral<const wchar_t>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
template <> struct is_integral<const bool>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
# if defined(BOOST_HAS_LONG_LONG)
template <> struct is_integral<const unsigned long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#elif defined(BOOST_HAS_MS_INT64)
template <> struct is_integral<const unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif //__int64
template <> struct is_float<const float>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<const double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<const long double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
// volatile-variations:
template <> struct is_integral<volatile unsigned char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile unsigned short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile unsigned int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile unsigned long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile signed char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile signed short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile signed int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile signed long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template <> struct is_integral<volatile wchar_t>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
template <> struct is_integral<volatile bool>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
# if defined(BOOST_HAS_LONG_LONG)
template <> struct is_integral<volatile unsigned long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#elif defined(BOOST_HAS_MS_INT64)
template <> struct is_integral<volatile unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<volatile __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif //__int64
template <> struct is_float<volatile float>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<volatile double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<volatile long double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
// const-volatile-variations:
template <> struct is_integral<const volatile unsigned char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile unsigned short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile unsigned int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile unsigned long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile signed char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile signed short>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile signed int>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile signed long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile char>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template <> struct is_integral<const volatile wchar_t>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
template <> struct is_integral<const volatile bool>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
# if defined(BOOST_HAS_LONG_LONG)
template <> struct is_integral<const volatile unsigned long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#elif defined(BOOST_HAS_MS_INT64)
template <> struct is_integral<const volatile unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif //__int64
template <> struct is_float<const volatile float>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<const volatile double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_float<const volatile long double>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif // BOOST_NO_CV_SPECIALIZATIONS
//* is a type T an arithmetic type described in the standard (3.9.1p8)
template <typename T>
struct is_arithmetic
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_integral<T>::value,
::boost::is_float<T>::value
>::value));
};
//* is a type T a fundamental type described in the standard (3.9.1)
template <typename T>
struct is_fundamental
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value,
::boost::is_void<T>::value
>::value));
};
} // namespace boost
#endif
#ifndef BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED
#define BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED
#include "boost/type_traits/is_arithmetic.hpp"
#include "boost/type_traits/is_float.hpp"
#include "boost/type_traits/is_fundamental.hpp"
#include "boost/type_traits/is_integral.hpp"
#include "boost/type_traits/is_void.hpp"
#endif // BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED

View File

@ -6,82 +6,10 @@
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
//
#ifndef BOOST_TT_ARRAY_TRAITS_HPP
# define BOOST_TT_ARRAY_TRAITS_HPP
# include <cstddef>
# include <boost/type_traits/utility.hpp>
# include <boost/type_traits/ice.hpp>
namespace boost {
#ifndef BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED
#define BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED
/**********************************************
*
* is_array
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_array
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T, std::size_t N> struct is_array<T[N]>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <typename T, std::size_t N> struct is_array<const T[N]>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <typename T, std::size_t N> struct is_array<volatile T[N]>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <typename T, std::size_t N> struct is_array<const volatile T[N]>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#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 <class T> T(* is_array_helper1(wrap<T>) )(wrap<T>);
char is_array_helper1(...);
#include "boost/type_traits/is_array.hpp"
template <class T> no_type is_array_helper2(T(*)(wrap<T>));
yes_type is_array_helper2(...);
}
template <typename T>
struct is_array
{
public:
BOOST_STATIC_CONSTANT(
bool, value = sizeof(
::boost::detail::is_array_helper2(
::boost::detail::is_array_helper1(
::boost::type_traits::wrap<T>()))) == 1
);
};
template <>
struct is_array<void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
# ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_array<const void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct is_array<volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct is_array<const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
# endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#endif // BOOST_TT_ARRAY_TRAITS_HPP
#endif // BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED

View File

@ -0,0 +1,108 @@
// Copyright (c) 2001 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,
// and with no claim as to its suitability for any purpose.
#ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
#include "boost/config.hpp"
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/
#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;
}
// same as BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1 macro, except that it
// never gets #undef-ined
# define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \
template<> struct trait<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) \
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) \
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*,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 { \
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
BOOST_TT_BROKEN_COMPILER_SPEC(wchar_t)
#endif
BOOST_TT_BROKEN_COMPILER_SPEC(signed char)
BOOST_TT_BROKEN_COMPILER_SPEC(unsigned char)
BOOST_TT_BROKEN_COMPILER_SPEC(signed short)
BOOST_TT_BROKEN_COMPILER_SPEC(unsigned short)
BOOST_TT_BROKEN_COMPILER_SPEC(signed int)
BOOST_TT_BROKEN_COMPILER_SPEC(unsigned int)
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)
// for backward compatibility
#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \
BOOST_TT_BROKEN_COMPILER_SPEC(T) \
/**/
#endif // BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_CONFIG_HPP_INCLUDED
#define BOOST_TT_CONFIG_HPP_INCLUDED
#ifndef BOOST_CONFIG_HPP
#include "boost/config.hpp"
#endif
//
// Helper macros for builtin compiler support.
// If your compiler has builtin support for any of the following
// traits concepts, then redefine the appropriate macros to pick
// up on the compiler support:
//
// (these should largely ignore cv-qualifiers)
// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
// BOOST_IS_UNION(T) should evaluate to true if T is a union type
// BOOST_IS_POD(T) should evaluate to true if T is a POD type
// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
#ifdef BOOST_HAS_SGI_TYPE_TRAITS
# include "boost/type_traits/is_same.hpp"
# include <type_traits.h>
# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
#endif
#ifndef BOOST_IS_CLASS
# define BOOST_IS_CLASS(T) false
#endif
#ifndef BOOST_IS_ENUM
# define BOOST_IS_ENUM(T) false
#endif
#ifndef BOOST_IS_UNION
# define BOOST_IS_UNION(T) false
#endif
#ifndef BOOST_IS_POD
# define BOOST_IS_POD(T) false
#endif
#ifndef BOOST_IS_EMPTY
# define BOOST_IS_EMPTY(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_COPY
# define BOOST_HAS_TRIVIAL_COPY(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_ASSIGN
# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
#endif
//
// whenever we have a conversion function with elipses
// it needs to be declared __cdecl to suppress compiler
// warnings from MS and Borland compilers:
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
# define BOOST_TT_DECL __cdecl
#else
# define BOOST_TT_DECL /**/
#endif
# if (defined(__MWERKS__) && __MWERKS__ >= 0x3000) || BOOST_MSVC > 1301 || defined(BOOST_NO_COMPILER_CONFIG)
# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
#endif
#endif // BOOST_TT_CONFIG_HPP_INCLUDED

View File

@ -13,316 +13,9 @@
// and with no claim as to its suitability for any purpose.
//
#ifndef BOOST_CONVERSION_TYPE_TRAITS_HPP
#define BOOST_CONVERSION_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
//
// is one type convertable to another?
//
// there are multiple versions of the is_convertible
// template, almost every compiler seems to require its
// own version.
//
// Thanks to Andrei Alexandrescu for the original version of the
// conversion detection technique!
//
namespace boost{
#if defined(BOOST_MSVC)
//
// MS specific version:
//
namespace detail{
// This workaround is necessary to handle when From is void
// which is normally taken care of by the partial specialization
// of the is_convertible class.
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
struct from_not_void_conversion {
template <class From, class To>
struct n_bind {
static no_type BOOST_TT_DECL _m_check(...);
static yes_type BOOST_TT_DECL _m_check(To);
public:
void foo(); // avoid warning about all members being private
static From _m_from;
enum { exists = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
};
};
struct from_is_void_conversion {
template <class From, class To>
struct n_bind {
enum { exists = ::boost::is_void<To>::value };
};
};
template <class From>
struct conversion_helper {
typedef from_not_void_conversion type;
};
template <>
struct conversion_helper<void> {
typedef from_is_void_conversion type;
};
} // namespace detail
template <class From, class To>
struct is_convertible
{
typedef typename detail::conversion_helper<From>::type Selector;
typedef typename Selector::template n_bind<From,To> Conversion;
public:
enum { value = Conversion::exists };
};
#elif defined(__BORLANDC__)
//
// special version for Borland compilers
// this version breaks when used for some
// UDT conversions:
//
template <class From, class To>
struct is_convertible
{
private:
#pragma option push -w-8074
// This workaround for Borland breaks the EDG C++ frontend,
// so we only use it for Borland.
template <class T>
struct checker
{
static type_traits::no_type BOOST_TT_DECL _m_check(...);
static type_traits::yes_type BOOST_TT_DECL _m_check(T);
};
static From _m_from;
public:
static const bool value = sizeof( checker<To>::_m_check(_m_from) ) == sizeof(type_traits::yes_type);
void foo(); // avoid warning about all members being private
#pragma option pop
};
#elif defined(__GNUC__)
//
// special version for gcc compiler
//
namespace detail{
struct any_conversion
{
template <class T>
any_conversion(const T&);
template <class T>
any_conversion(T&);
};
template <class T>
struct checker
{
static boost::type_traits::no_type _m_check(any_conversion ...);
static boost::type_traits::yes_type _m_check(T, int);
};
} // namespace detail
template <class From, class To>
struct is_convertible
{
private:
static From _m_from;
public:
static const bool value = sizeof( detail::checker<To>::_m_check(_m_from, 0) ) == sizeof(type_traits::yes_type);
void foo(); // avoid warning about all members being private
};
// Declare specializations of is_convertible for all of the floating
// types to all of the integral types. This suppresses some nasty
// warnings
# define BOOST_IS_CONVERTIBLE(T1,T2) template<>struct is_convertible<T1,T2>{static const bool value=true;};
# define BOOST_IS_CONVERTIBLE2(T1,T2) \
BOOST_IS_CONVERTIBLE(T1,signed T2) \
BOOST_IS_CONVERTIBLE(T1,unsigned T2)
# define BOOST_FLOAT_IS_CONVERTIBLE(F) \
BOOST_IS_CONVERTIBLE(F,char) \
BOOST_IS_CONVERTIBLE2(F,char) \
BOOST_IS_CONVERTIBLE2(F,short) \
BOOST_IS_CONVERTIBLE2(F,int) \
BOOST_IS_CONVERTIBLE2(F,long) \
BOOST_IS_CONVERTIBLE2(F,long long)
BOOST_FLOAT_IS_CONVERTIBLE(float)
BOOST_FLOAT_IS_CONVERTIBLE(double)
BOOST_FLOAT_IS_CONVERTIBLE(long double)
BOOST_FLOAT_IS_CONVERTIBLE(float const)
BOOST_FLOAT_IS_CONVERTIBLE(double const)
BOOST_FLOAT_IS_CONVERTIBLE(long double const)
BOOST_FLOAT_IS_CONVERTIBLE(float volatile)
BOOST_FLOAT_IS_CONVERTIBLE(double volatile)
BOOST_FLOAT_IS_CONVERTIBLE(long double volatile)
BOOST_FLOAT_IS_CONVERTIBLE(float const volatile)
BOOST_FLOAT_IS_CONVERTIBLE(double const volatile)
BOOST_FLOAT_IS_CONVERTIBLE(long double const volatile)
# undef BOOST_FLOAT_IS_CONVERTIBLE
# undef BOOST_IS_CONVERTIBLE2
# undef BOOST_IS_CONVERTIBLE
#else
template <class From, class To>
struct is_convertible
{
private:
static type_traits::no_type BOOST_TT_DECL _m_check(...);
static type_traits::yes_type BOOST_TT_DECL _m_check(To);
static From _m_from;
public:
BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(type_traits::yes_type));
void foo(); // avoid warning about all members being private
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// A definition is required even for integral static constants
template <class From, class To>
const bool is_convertible<From, To>::value;
#endif
#endif // is_convertible
//
// Now add the full and partial specialisations
// for void types, these are common to all the
// implementation above:
//
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class From>
struct is_convertible<From, void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <class From>
struct is_convertible<From, const void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class From>
struct is_convertible<From, volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class From>
struct is_convertible<From, const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS
template <class To>
struct is_convertible<void, To>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <class To>
struct is_convertible<const void, To>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class To>
struct is_convertible<volatile void, To>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class To>
struct is_convertible<const volatile void, To>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <>
struct is_convertible<void, void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_convertible<void, const void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<void, volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<void, const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const void, const void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const void, volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const void, const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<volatile void, const void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<volatile void, volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<volatile void, const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const volatile void, const void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const volatile void, volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_convertible<const volatile void, const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
#endif
} // namespace boost
#endif // include guard
#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED
#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED
#include "boost/type_traits/is_convertible.hpp"
#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED

View File

@ -9,392 +9,17 @@
//
// defines traits classes for cv-qualified types:
// is_const, is_volatile, remove_const, remove_volatile, remove_cv.
//
// Revision History:
// 24th March 2001:
// Fixed is_const/is_volatile so that they work with reference types
#ifndef BOOST_CV_TYPE_TRAITS_HPP
#define BOOST_CV_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef BOOST_TT_REFERENCE_TRAITS_HPP
# include <boost/type_traits/reference_traits.hpp>
#endif
#ifndef BOOST_TT_ARRAY_TRAITS_HPP
# include <boost/type_traits/array_traits.hpp>
#endif
#ifndef BOOST_TT_UTILITY_HPP
# include <boost/type_traits/utility.hpp>
#endif
namespace boost{
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail{
//
// implementation helper:
//
template <class T>
struct cv_traits_imp{};
template <class T>
struct cv_traits_imp<T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = false);
BOOST_STATIC_CONSTANT(bool, is_volatile = false);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<const T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = true);
BOOST_STATIC_CONSTANT(bool, is_volatile = false);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<volatile T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = false);
BOOST_STATIC_CONSTANT(bool, is_volatile = true);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<const volatile T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = true);
BOOST_STATIC_CONSTANT(bool, is_volatile = true);
typedef T unqualified_type;
};
template <class T, bool is_vol>
struct remove_const_helper
{
typedef T type;
};
template <class T>
struct remove_const_helper<T, true>
{
typedef volatile T type;
};
template <class T, bool is_vol>
struct remove_volatile_helper
{
typedef T type;
};
template <class T>
struct remove_volatile_helper<T, true>
{
typedef const T type;
};
} // namespace detail
// * convert a type T to a non-volatile type - remove_volatile<T>
template <typename T>
struct remove_volatile
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type uq_type;
typedef typename detail::remove_volatile_helper<uq_type, ::boost::is_const<T>::value>::type type;
};
template <typename T> struct remove_volatile<T&>{ typedef T& type; };
template <typename T, std::size_t N> struct remove_volatile<volatile T[N]>{ typedef T type[N]; };
template <typename T, std::size_t N> struct remove_volatile<const volatile T[N]>{ typedef const T type[N]; };
// * convert a type T to non-const type - remove_const<T>
template <typename T>
struct remove_const
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type uq_type;
typedef typename detail::remove_const_helper<uq_type, ::boost::is_volatile<T>::value>::type type;
};
template <typename T> struct remove_const<T&>{ typedef T& type; };
template <typename T, std::size_t N> struct remove_const<const T[N]>{ typedef T type[N]; };
template <typename T, std::size_t N> struct remove_const<const volatile T[N]>{ typedef volatile T type[N]; };
// convert a type T to a non-cv-qualified type - remove_cv<T>
template <typename T>
struct remove_cv
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type type;
};
template <typename T> struct remove_cv<T&>{ typedef T& type; };
template <typename T, std::size_t N> struct remove_cv<const T[N]>{ typedef T type[N]; };
template <typename T, std::size_t N> struct remove_cv<volatile T[N]>{ typedef T type[N]; };
template <typename T, std::size_t N> struct remove_cv<const volatile T[N]>{ typedef T type[N]; };
//* is a type T declared const - is_const<T>
template <typename T>
struct is_const
{
BOOST_STATIC_CONSTANT(bool, value = detail::cv_traits_imp<T*>::is_const);
};
template <typename T> struct is_const<T&>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T> struct is_const<T&const>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T> struct is_const<T&volatile>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T> struct is_const<T&const volatile>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
#endif
//* is a type T declared volatile - is_volatile<T>
template <typename T>
struct is_volatile
{
BOOST_STATIC_CONSTANT(bool, value = detail::cv_traits_imp<T*>::is_volatile);
};
template <typename T> struct is_volatile<T&>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T> struct is_volatile<T&const>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T> struct is_volatile<T&volatile>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T> struct is_volatile<T&const volatile>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// The following three don't work:
template <typename T> struct remove_volatile{ typedef T type; };
template <typename T> struct remove_const{ typedef T type; };
template <typename T> struct remove_cv{ typedef T type; };
namespace detail{
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
yes_type is_const_helper(const volatile void*);
no_type is_const_helper(volatile void *);
yes_type is_volatile_helper(const volatile void*);
no_type is_volatile_helper(const void *);
}
namespace detail
{
template <bool is_ref, bool array>
struct is_const_impl
: ::boost::type_traits::false_unary_metafunction
{};
template <>
struct is_const_impl<false,false>
{
template <class T>
struct apply
{
private:
static T* t;
public:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_const_helper(t))));
};
};
template <>
struct is_const_impl<false,true>
{
template <class T>
struct apply
{
private:
static T t;
public:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_const_helper(&t))));
};
};
}
template <typename T>
struct is_const
: ::boost::detail::is_const_impl<
is_reference<T>::value
, is_array<T>::value
>::template apply<T>
{
};
template <>
struct is_const<void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_const<const void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_const<volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct is_const<const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
#endif
namespace detail
{
template <bool is_ref, bool array>
struct is_volatile_impl
: ::boost::type_traits::false_unary_metafunction
{};
template <>
struct is_volatile_impl<false,false>
{
template <class T>
struct apply
{
private:
static T* t;
public:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_volatile_helper(t))));
};
};
template <>
struct is_volatile_impl<false,true>
{
template <class T>
struct apply
{
private:
static T t;
public:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_volatile_helper(&t))));
};
};
}
template <typename T>
struct is_volatile
: ::boost::detail::is_volatile_impl<
is_reference<T>::value
, is_array<T>::value
>::template apply<T>
{
};
template <>
struct is_volatile<void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_volatile<const void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct is_volatile<volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct is_volatile<const volatile void>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// * convert a type T to const type - add_const<T>
// this is not required since the result is always
// the same as "T const", but it does suppress warnings
// from some compilers:
template <typename T>
struct add_const
{
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_const is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
typedef T const type;
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
};
// * convert a type T to volatile type - add_volatile<T>
// this is not required since the result is always
// the same as "T volatile", but it does suppress warnings
// from some compilers:
template <typename T>
struct add_volatile
{
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_volatile is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
typedef T volatile type;
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
};
// * convert a type T to a const volatile type - add_cv<T>
// this is not required since the result is always
// the same as "T const volatile", but it does suppress warnings
// from some compilers:
template <typename T>
struct add_cv
{
#if defined(BOOST_MSVC)
// This bogus warning will appear when add_volatile is applied to a
// const volatile reference because we can't detect const volatile
// references with MSVC6.
# pragma warning(push)
# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
#endif
typedef T const volatile type;
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
struct add_const<T&>{ typedef T& type; };
template <class T>
struct add_volatile<T&>{ typedef T& type; };
template <class T>
struct add_cv<T&>{ typedef T& type; };
#endif
} // namespace boost
#endif // BOOST_CV_TYPE_TRAITS_HPP
#ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED
#define BOOST_TT_CV_TRAITS_HPP_INCLUDED
#include "boost/type_traits/add_const.hpp"
#include "boost/type_traits/add_volatile.hpp"
#include "boost/type_traits/add_cv.hpp"
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/remove_const.hpp"
#include "boost/type_traits/remove_volatile.hpp"
#include "boost/type_traits/remove_cv.hpp"
#endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED

View File

@ -0,0 +1,40 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/bool_trait.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED
#define BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED
#include "boost/mpl/bool_c.hpp"
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
template< bool C > struct bool_trait
{
typedef mpl::bool_c<C> type;
BOOST_STATIC_CONSTANT(bool, value = C);
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template< bool C >
bool const bool_trait<C>::value;
#endif
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED

View File

@ -0,0 +1,117 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/bool_trait_def.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#include "boost/type_traits/detail/template_arity_spec.hpp"
#include "boost/mpl/bool_c.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/
#else
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
typedef mpl::bool_c< C > base_; \
using base_::value; \
/**/
#endif
#define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \
template< typename T > struct trait \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
\
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \
template< typename T1, typename T2 > struct trait \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \
}; \
\
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
template<> struct trait<sp> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(sp)) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \
template<> struct trait<sp1,sp2> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \
template< param > struct trait<sp> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \
template< param1, param2 > struct trait<sp> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
template< param > struct trait<sp1,sp2> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \
template< param1, param2 > struct trait<sp1,sp2> \
: mpl::bool_c< C > \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(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) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const,value) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp volatile,value) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const volatile,value) \
/**/
#else
# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \
/**/
#endif

View File

@ -0,0 +1,27 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/bool_trait_undef.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
#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_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_CV_SPEC1

View File

@ -0,0 +1,62 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED
#define BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED
#include "boost/config.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace boost {
namespace detail {
// implementation helper:
template <typename T> struct cv_traits_imp {};
template <typename T>
struct cv_traits_imp<T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = false);
BOOST_STATIC_CONSTANT(bool, is_volatile = false);
typedef T unqualified_type;
};
template <typename T>
struct cv_traits_imp<const T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = true);
BOOST_STATIC_CONSTANT(bool, is_volatile = false);
typedef T unqualified_type;
};
template <typename T>
struct cv_traits_imp<volatile T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = false);
BOOST_STATIC_CONSTANT(bool, is_volatile = true);
typedef T unqualified_type;
};
template <typename T>
struct cv_traits_imp<const volatile T*>
{
BOOST_STATIC_CONSTANT(bool, is_const = true);
BOOST_STATIC_CONSTANT(bool, is_volatile = true);
typedef T unqualified_type;
};
} // namespace detail
} // namespace boost
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,26 @@
// Copyright David Abrahams 2002. 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, and with no claim as
// to its suitability for any purpose.
#ifndef BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED
#define BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
// Utility class which always "returns" false
struct false_result
{
template <typename T> struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
}} // namespace boost::type_traits
#endif // BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED

View File

@ -0,0 +1,36 @@
// (C) Copyright John Maddock and Steve Cleary 2000.
//
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED
#define BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true>
struct ice_and;
template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
struct ice_and
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct ice_and<true, true, true, true, true, true, true>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED

View File

@ -0,0 +1,38 @@
// (C) Copyright John Maddock and Steve Cleary 2000.
//
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED
#define BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
template <int b1, int b2>
struct ice_eq
{
BOOST_STATIC_CONSTANT(bool, value = (b1 == b2));
};
template <int b1, int b2>
struct ice_ne
{
BOOST_STATIC_CONSTANT(bool, value = (b1 != b2));
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template <int b1, int b2> bool const ice_eq<b1,b2>::value;
template <int b1, int b2> bool const ice_ne<b1,b2>::value;
#endif
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED

View File

@ -0,0 +1,33 @@
// (C) Copyright John Maddock and Steve Cleary 2000.
//
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED
#define BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
template <bool b>
struct ice_not
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct ice_not<true>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED

View File

@ -0,0 +1,36 @@
// (C) Copyright John Maddock and Steve Cleary 2000.
//
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED
#define BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED
#include "boost/config.hpp"
namespace boost {
namespace type_traits {
template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false>
struct ice_or;
template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
struct ice_or
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct ice_or<false, false, false, false, false, false, false>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED

View File

@ -0,0 +1,142 @@
// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
// Copyright (C) 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
//
// Permission to copy and use this software is granted,
// provided this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED
#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
#if defined(BOOST_TT_PREPROCESSING_MODE)
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/enum_params.hpp"
# include "boost/preprocessor/comma_if.hpp"
#endif
namespace boost {
namespace type_traits {
template <class R>
struct is_function_ptr_helper
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#if !defined(BOOST_TT_PREPROCESSING_MODE)
// preprocessor-generated part, don't edit by hand!
template <class R>
struct is_function_ptr_helper<R (*)()> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0>
struct is_function_ptr_helper<R (*)(T0)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1>
struct is_function_ptr_helper<R (*)(T0,T1)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2>
struct is_function_ptr_helper<R (*)(T0,T1,T2)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23)> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
struct is_function_ptr_helper<R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#else
#undef BOOST_STATIC_CONSTANT
#define BOOST_PP_ITERATION_PARAMS_1 \
(0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template <class R BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T)>
struct is_function_ptr_helper<R (*)(BOOST_PP_ENUM_PARAMS(i,T))> { BOOST_STATIC_CONSTANT(bool, value = true); };
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,133 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
// 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,
// and with no claim as to its suitability for any purpose.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/config.hpp"
#if defined(BOOST_TT_PREPROCESSING_MODE)
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/enum_params.hpp"
# include "boost/preprocessor/comma_if.hpp"
#endif
namespace boost {
namespace type_traits {
no_type BOOST_TT_DECL is_function_ptr_tester(...);
#if !defined(BOOST_TT_PREPROCESSING_MODE)
// preprocessor-generated part, don't edit by hand!
template <class R>
yes_type is_function_ptr_tester(R (*)());
template <class R,class T0 >
yes_type is_function_ptr_tester(R (*)(T0));
template <class R,class T0,class T1 >
yes_type is_function_ptr_tester(R (*)(T0,T1));
template <class R,class T0,class T1,class T2 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2));
template <class R,class T0,class T1,class T2,class T3 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3));
template <class R,class T0,class T1,class T2,class T3,class T4 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
yes_type is_function_ptr_tester(R (*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24));
#else
#define BOOST_PP_ITERATION_PARAMS_1 \
(0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template <class R BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(i,T)));
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,133 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
// 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,
// and with no claim as to its suitability for any purpose.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_TT_DETAIL_IS_FUNCTION_TYPE_TESTER_HPP_INCLUDED
#define BOOST_TT_DETAIL_IS_FUNCTION_TYPE_TESTER_HPP_INCLUDED
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/config.hpp"
#if defined(BOOST_TT_PREPROCESSING_MODE)
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/enum_params.hpp"
# include "boost/preprocessor/comma_if.hpp"
#endif
namespace boost {
namespace type_traits {
no_type BOOST_TT_DECL is_function_type_tester(...);
#if !defined(BOOST_TT_PREPROCESSING_MODE)
// preprocessor-generated part, don't edit by hand!
template <class R>
yes_type is_function_type_tester(R f());
template <class R,class T0>
yes_type is_function_type_tester(R f(T0));
template <class R,class T0,class T1>
yes_type is_function_type_tester(R f(T0,T1));
template <class R,class T0,class T1,class T2>
yes_type is_function_type_tester(R f(T0,T1,T2));
template <class R,class T0,class T1,class T2,class T3>
yes_type is_function_type_tester(R f(T0,T1,T2,T3));
template <class R,class T0,class T1,class T2,class T3,class T4>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23));
template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
yes_type is_function_type_tester(R f(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24));
#else
#define BOOST_PP_ITERATION_PARAMS_1 \
(0, 25, "boost/type_traits/detail/is_function_type_tester.hpp")
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_IS_FUNCTION_TYPE_TESTER_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template <class R BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_function_type_tester(R f(BOOST_PP_ENUM_PARAMS(i,T)));
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,358 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
// 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,
// and with no claim as to its suitability for any purpose.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED
#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED
#include "boost/config.hpp"
#if defined(BOOST_TT_PREPROCESSING_MODE)
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/enum_params.hpp"
# include "boost/preprocessor/comma_if.hpp"
#endif
namespace boost {
namespace type_traits {
template <typename T>
struct is_mem_fun_pointer_impl
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#if !defined(BOOST_TT_PREPROCESSING_MODE)
// preprocessor-generated part, don't edit by hand!
template <class R,class T>
struct is_mem_fun_pointer_impl<R (T::*)()> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T>
struct is_mem_fun_pointer_impl<R (T::*)() const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T>
struct is_mem_fun_pointer_impl<R (T::*)() volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T>
struct is_mem_fun_pointer_impl<R (T::*)() const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0>
struct is_mem_fun_pointer_impl<R (T::*)(T0)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0>
struct is_mem_fun_pointer_impl<R (T::*)(T0) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0>
struct is_mem_fun_pointer_impl<R (T::*)(T0) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0>
struct is_mem_fun_pointer_impl<R (T::*)(T0) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24)> { BOOST_STATIC_CONSTANT(bool,value = true); };
#if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) const> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24>
struct is_mem_fun_pointer_impl<R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) const volatile> { BOOST_STATIC_CONSTANT(bool,value = true); };
#endif // __MWERKS__ < 0x3000
#else
#undef BOOST_STATIC_CONSTANT
#define BOOST_PP_ITERATION_PARAMS_1 \
(0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T)>
struct is_mem_fun_pointer_impl<R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) > { BOOST_STATIC_CONSTANT(bool, value = true); };
// Metrowerks thinks this creates ambiguities
//: #if !defined(__MWERKS__) || __MWERKS__ >= 0x3000
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T)>
struct is_mem_fun_pointer_impl<R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) const > { BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T)>
struct is_mem_fun_pointer_impl<R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) volatile > { BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T)>
struct is_mem_fun_pointer_impl<R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) const volatile > { BOOST_STATIC_CONSTANT(bool, value = true); };
//: #endif // __MWERKS__ < 0x3000
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,298 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
// 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,
// and with no claim as to its suitability for any purpose.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/config.hpp"
#if defined(BOOST_TT_PREPROCESSING_MODE)
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/enum_params.hpp"
# include "boost/preprocessor/comma_if.hpp"
#endif
namespace boost {
namespace type_traits {
no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...);
#if !defined(BOOST_TT_PREPROCESSING_MODE)
// preprocessor-generated part, don't edit by hand!
template <class R,class T>
yes_type is_mem_fun_pointer_tester(R (T::*)());
template <class R,class T>
yes_type is_mem_fun_pointer_tester(R (T::*)() const);
template <class R,class T>
yes_type is_mem_fun_pointer_tester(R (T::*)() volatile);
template <class R,class T>
yes_type is_mem_fun_pointer_tester(R (T::*)() const volatile);
template <class R,class T,class T0 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0));
template <class R,class T,class T0 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0) const);
template <class R,class T,class T0 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0) volatile);
template <class R,class T,class T0 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0) const volatile);
template <class R,class T,class T0,class T1 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1));
template <class R,class T,class T0,class T1 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1) const);
template <class R,class T,class T0,class T1 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1) volatile);
template <class R,class T,class T0,class T1 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1) const volatile);
template <class R,class T,class T0,class T1,class T2 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2));
template <class R,class T,class T0,class T1,class T2 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2) const);
template <class R,class T,class T0,class T1,class T2 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2) volatile);
template <class R,class T,class T0,class T1,class T2 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3));
template <class R,class T,class T0,class T1,class T2,class T3 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3) const);
template <class R,class T,class T0,class T1,class T2,class T3 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3) volatile);
template <class R,class T,class T0,class T1,class T2,class T3 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4));
template <class R,class T,class T0,class T1,class T2,class T3,class T4 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23) const volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24));
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) const);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) volatile);
template <class R,class T,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
yes_type is_mem_fun_pointer_tester(R (T::*)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24) const volatile);
#else
#define BOOST_PP_ITERATION_PARAMS_1 \
(0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_mem_fun_pointer_tester(R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)));
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_mem_fun_pointer_tester(R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) const);
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_mem_fun_pointer_tester(R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) volatile);
template <class R, class T BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
yes_type is_mem_fun_pointer_tester(R (T::*)(BOOST_PP_ENUM_PARAMS(i,T)) const volatile);
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,43 @@
//-----------------------------------------------------------------------------
// boost type_traits/aux_/size_t_trait.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED
#define BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED
#include "boost/mpl/integral_c.hpp"
#include "boost/config.hpp"
#include <cstddef>
namespace boost {
namespace type_traits {
template< std::size_t N >
struct size_t_trait
{
typedef mpl::integral_c<std::size_t,N> type;
BOOST_STATIC_CONSTANT(std::size_t, value = N);
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template< std::size_t N >
std::size_t const size_t_trait<N>::value;
#endif
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED

View File

@ -0,0 +1,48 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/size_t_trait_def.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#include "boost/type_traits/detail/size_t_trait.hpp"
#include "boost/type_traits/detail/template_arity_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,value) \
template< typename T > struct trait \
: ::boost::type_traits::size_t_trait< value > \
{ \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
\
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
/**/
#define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,value) \
template<> struct trait<spec> \
: ::boost::type_traits::size_t_trait< value > \
{ \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(spec)) \
}; \
/**/
// BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait)
#define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,value) \
template< param > struct trait<spec> \
: ::boost::type_traits::size_t_trait< value > \
{ \
}; \
/**/

View File

@ -0,0 +1,21 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/size_t_trait_undef.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1
#undef BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1
#undef BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1

View File

@ -0,0 +1,40 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/template_arity_spec.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
#include "boost/config.hpp"
#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \
defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION)
# define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) \
namespace mpl { namespace aux { \
template< BOOST_MPL_PP_PARAMS(i, typename T) > \
struct template_arity< \
name< BOOST_MPL_PP_PARAMS(i, T) > \
> \
{ \
BOOST_STATIC_CONSTANT(int, value = i ); \
}; \
}} \
/**/
#else
# define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/
#endif

View File

@ -0,0 +1,52 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/type_trait_def.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#include "boost/type_traits/detail/template_arity_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
template< typename T > struct trait \
{ \
typedef result type; \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
\
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
/**/
#define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
template<> struct trait<spec> \
{ \
typedef result type; \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(spec)) \
}; \
/**/
#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
template< param > struct trait<spec> \
{ \
typedef result type; \
}; \
/**/
#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
template< param1, param2 > struct trait<spec> \
{ \
typedef result; \
}; \
/**/

View File

@ -0,0 +1,22 @@
//-----------------------------------------------------------------------------
// boost/type_traits/detail/type_trait_undef.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
#undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2

View File

@ -0,0 +1,17 @@
// Copyright David Abrahams 2002. 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, and with no claim as
// to its suitability for any purpose.
#ifndef BOOST_TT_DETAIL_WRAP_HPP_INCLUDED
#define BOOST_TT_DETAIL_WRAP_HPP_INCLUDED
namespace boost {
namespace type_traits {
template <class T> struct wrap {};
}} // namespace boost::type_traits
#endif // BOOST_TT_DETAIL_WRAP_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
// (C) Copyright John Maddock and Steve Cleary 2000.
// 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, and with no claim
// as to its suitability for any purpose.
// See http://www.boost.org for most recent version including documentation.
//
// macros and helpers for working with integral-constant-expressions.
#ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED
#define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED
namespace boost {
namespace type_traits {
typedef char yes_type;
typedef double no_type;
} // namespace type_traits
} // namespace boost
#endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED

View File

@ -10,143 +10,14 @@
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
#ifndef BOOST_FUNCTION_TYPE_TRAITS_HPP
#define BOOST_FUNCTION_TYPE_TRAITS_HPP
#ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
#define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP
#include <boost/type_traits/composite_traits.hpp>
#endif
//
// is a type a function?
// Please note that this implementation is unnecessarily complex:
// we could just use !is_convertible<T*, const volatile void*>::value,
// except that some compilers erroneously allow conversions from
// function pointers to void*.
//
namespace boost{
namespace detail{
#include <boost/config.hpp>
#include <boost/type_traits/is_function.hpp>
#include <boost/type_traits/add_pointer.hpp>
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class R>
struct is_function_helper_base{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <class R>
struct is_function_helper_base<R (*)(void)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0>
struct is_function_helper_base<R (*)(A0)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1>
struct is_function_helper_base<R (*)(A0, A1)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2>
struct is_function_helper_base<R (*)(A0, A1, A2)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3>
struct is_function_helper_base<R (*)(A0, A1, A2, A3)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23, class A24>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23, class A24, class A25>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23, class A24, class A25, class A26>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23, class A24, class A25, class A26, class A27>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class R, class A0, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11, class A12, class A13, class A14, class A15, class A16, class A17, class A18, class A19, class A20, class A21, class A22, class A23, class A24, class A25, class A26, class A27, class A28>
struct is_function_helper_base<R (*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28)>{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <class T>
struct is_function_helper : is_function_helper_base<T*>{};
#else
template <class T>
struct is_function_helper
{
static T* t;
BOOST_STATIC_CONSTANT(bool, value = sizeof(is_function_tester(t)) == sizeof(::boost::type_traits::yes_type));
//BOOST_STATIC_CONSTANT(bool, value = (!::boost::is_convertible<T*, const volatile void*>::value));
};
#endif
template <class T>
struct is_function_ref_helper
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template <class T, bool is_ref>
struct is_function_chooser
{
typedef is_function_helper<T> type;
};
template <class T>
struct is_function_chooser<T, true>
{
typedef is_function_ref_helper<T> type;
};
#endif
} // namespace detail
template <class T>
struct is_function
{
private:
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
typedef typename detail::is_function_chooser<T, ::boost::is_reference<T>::value>::type m_type;
#else
// without partial specialistaion we can't use is_reference on
// function types, that leaves this template broken in the case that
// T is a reference:
typedef detail::is_function_helper<T> m_type;
#endif
public:
BOOST_STATIC_CONSTANT(bool, value = m_type::value);
};
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail {
@ -361,6 +232,6 @@ struct function_traits
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // boost
}
#endif // BOOST_FUNCTION_TYPE_TRAITS_HPP
#endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED

View File

@ -1,201 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
//
// forward declarations of type_traits classes
//
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#define BOOST_FWD_TYPE_TRAITS_HPP
#include <cstdlib>
#include <cstddef>
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
//
// Helper macros for builtin compiler support.
// If your compiler has builtin support for any of the following
// traits concepts, then redefine the appropriate macros to pick
// up on the compiler support:
//
// (these should largely ignore cv-qualifiers)
// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
// BOOST_IS_UNION(T) should evaluate to true if T is a union type
// BOOST_IS_POD(T) should evaluate to true if T is a POD type
// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
#ifdef BOOST_HAS_SGI_TYPE_TRAITS
# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
#endif
#ifndef BOOST_IS_CLASS
# define BOOST_IS_CLASS(T) false
#endif
#ifndef BOOST_IS_ENUM
# define BOOST_IS_ENUM(T) false
#endif
#ifndef BOOST_IS_UNION
# define BOOST_IS_UNION(T) false
#endif
#ifndef BOOST_IS_POD
# define BOOST_IS_POD(T) false
#endif
#ifndef BOOST_IS_EMPTY
# define BOOST_IS_EMPTY(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_COPY
# define BOOST_HAS_TRIVIAL_COPY(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_ASSIGN
# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
#endif
#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
#endif
//
// whenever we have a conversion function with elipses
// it needs to be declared __cdecl to suppress compiler
// warnings from MS and Borland compilers:
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
#define BOOST_TT_DECL __cdecl
#else
#define BOOST_TT_DECL
#endif
namespace boost{
//
// forward declare all type traits templates here
//
// conversion_traits.hpp:
template <class From, class To>
struct is_convertible;
// alignment_traits.hpp:
template <class T>
struct alignment_of;
// arithmetic_traits.hpp:
template <class T>
struct is_void;
template <class T>
struct is_integral;
template <class T>
struct is_float;
template <class T>
struct is_arithmetic;
template <class T>
struct is_fundamental;
// cv_traits.hpp:
template <class T>
struct is_const;
template <class T>
struct is_volatile;
template <class T>
struct remove_const;
template <class T>
struct remove_volatile;
template <class T>
struct remove_cv;
template <class T>
struct add_const;
template <class T>
struct add_volatile;
template <class T>
struct add_cv;
// composite_traits.hpp:
template <class T>
struct is_array;
template <class T>
struct is_pointer;
template <class T>
struct is_reference;
template <class T>
struct is_member_pointer;
template <class T>
struct is_member_function_pointer;
template <class T>
struct is_enum;
template <class T>
struct is_union;
// object_traits.hpp:
template <class T>
struct is_object;
template <class T>
struct is_scalar;
template <class T>
struct is_class;
template <class T>
struct is_compound;
template <class T>
struct is_POD;
template <class T>
struct has_trivial_constructor;
template <class T>
struct has_trivial_copy;
template <class T>
struct has_trivial_assign;
template <class T>
struct has_trivial_destructor;
template <class T>
struct has_nothrow_constructor;
template <class T>
struct has_nothrow_copy;
template <class T>
struct has_nothrow_assign;
template <class T>
struct is_empty;
template <class Base, class Derived>
struct is_base_and_derived;
// transform_traits.hpp:
template <class T>
struct remove_reference;
template <class T>
struct add_reference;
template <class T>
struct remove_bounds;
template <class T>
struct remove_pointer;
template <class T>
struct add_pointer;
// same_traits.hpp:
template <class T, class U>
struct is_same;
} // namespace boost
#endif // BOOST_FWD_TYPE_TRAITS_HPP

View File

@ -0,0 +1,26 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
#include "boost/type_traits/has_trivial_assign.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::has_trivial_assign<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED

View File

@ -0,0 +1,26 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
#include "boost/type_traits/has_trivial_constructor.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::has_trivial_constructor<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED

View File

@ -0,0 +1,26 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED
#include "boost/type_traits/has_trivial_copy.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::has_trivial_copy<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED

View File

@ -0,0 +1,26 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED
#include "boost/type_traits/has_trivial_destructor.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_destructor,T,::boost::has_trivial_destructor<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED

View File

@ -0,0 +1,50 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct has_trivial_assign_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_ASSIGN(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct has_trivial_ctor_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED

View File

@ -0,0 +1,48 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct has_trivial_copy_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_COPY(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct has_trivial_dtor_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED

View File

@ -9,79 +9,13 @@
//
// macros and helpers for working with integral-constant-expressions.
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#define BOOST_ICE_TYPE_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
namespace boost{
namespace type_traits{
typedef char yes_type;
typedef double no_type;
template <bool b>
struct ice_not
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <>
struct ice_not<true>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false>
struct ice_or;
template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
struct ice_or
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <>
struct ice_or<false, false, false, false, false, false, false>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true>
struct ice_and;
template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
struct ice_and
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <>
struct ice_and<true, true, true, true, true, true, true>
{
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <int b1, int b2>
struct ice_eq
{
BOOST_STATIC_CONSTANT(bool, value = (b1 == b2));
};
template <int b1, int b2>
struct ice_ne
{
BOOST_STATIC_CONSTANT(bool, value = (b1 != b2));
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template <int b1, int b2>
const bool ice_eq<b1,b2>::value;
template <int b1, int b2>
const bool ice_ne<b1,b2>::value;
#endif
} // namespace type_traits
} // namespace boost
#endif // BOOST_ICE_TYPE_TRAITS_HPP
#ifndef BOOST_TT_ICE_HPP_INCLUDED
#define BOOST_TT_ICE_HPP_INCLUDED
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
#include "boost/type_traits/detail/ice_eq.hpp"
#endif // BOOST_TT_ICE_HPP_INCLUDED

View File

@ -0,0 +1,44 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
#include "boost/type_traits/is_integral.hpp"
#include "boost/type_traits/is_float.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template< typename T >
struct is_arithmetic_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_integral<T>::value,
::boost::is_float<T>::value
>::value));
};
} // namespace detail
//* is a type T an arithmetic type described in the standard (3.9.1p8)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED

View File

@ -0,0 +1,78 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED
#define BOOST_TT_IS_ARRAY_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/yes_no_type.hpp"
# include "boost/type_traits/detail/wrap.hpp"
#endif
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const[N],true)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T volatile[N],true)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const volatile[N],true)
#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<T>) )(wrap<T>);
char BOOST_TT_DECL is_array_tester1(...);
template< typename T> no_type is_array_tester2(T(*)(wrap<T>));
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<T>()
)
)) == 1
);
};
} // 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
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED

View File

@ -0,0 +1,56 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
#include "boost/type_traits/is_class.hpp"
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename Base, typename Derived>
struct is_base_and_derived_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::is_convertible<Derived*,Base*>::value,
::boost::is_class<Derived>::value,
::boost::is_class<Base>::value
>::value)
);
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF2(
is_base_and_derived
, Base
, Derived
, (::boost::detail::is_base_and_derived_impl<Base,Derived>::value)
)
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base,Derived&,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false)
#endif
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED

View File

@ -6,44 +6,91 @@
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
//
#ifndef BOOST_TYPE_TRAITS_IS_CLASS_HPP
# define BOOST_TYPE_TRAITS_IS_CLASS_HPP
# if (defined(__MWERKS__) && __MWERKS__ >= 0x3000) || defined(BOOST_MSVC) && _MSC_FULL_VER > 13012108 || defined(BOOST_NO_COMPILER_CONFIG)
# ifndef BOOST_ICE_TYPE_TRAITS_HPP
# include <boost/type_traits/ice.hpp>
# endif
#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED
#define BOOST_TT_IS_CLASS_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
# include "boost/type_traits/detail/yes_no_type.hpp"
#else
# include "boost/type_traits/is_union.hpp"
# include "boost/type_traits/is_scalar.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_void.hpp"
# include "boost/type_traits/is_function.hpp"
# include "boost/type_traits/detail/ice_and.hpp"
# include "boost/type_traits/detail/ice_not.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
# define BOOST_TYPE_TRAITS_IS_CLASS_DEFINED
namespace boost {
template <typename T>
struct is_class
{
// This is actually the conforming implementation which works with
// abstract classes. However, enough compilers have trouble with
// it that most will use the one in
// boost/type_traits/object_traits.hpp. This implementation
// actually works with VC7.0, but other interactions seem to fail
// when we use it.
namespace detail {
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
// This is actually the conforming implementation which works with
// abstract classes. However, enough compilers have trouble with
// it that most will use the one in
// boost/type_traits/object_traits.hpp. This implementation
// actually works with VC7.0, but other interactions seem to fail
// when we use it.
// is_class<> metafunction due to Paul Mensonides
// (leavings@attbi.com). For more details:
// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
private:
template <class U> static ::boost::type_traits::yes_type is_class_helper(void(U::*)(void));
template <class U> static ::boost::type_traits::no_type is_class_helper(...);
public:
BOOST_STATIC_CONSTANT(
bool, value = sizeof(
is_class_helper<T>(0)
) == sizeof(::boost::type_traits::yes_type));
template <typename T>
struct is_class_impl
{
template <class U> static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
template <class U> static ::boost::type_traits::no_type is_class_tester(...);
BOOST_STATIC_CONSTANT(bool, value =
sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
);
};
}
# else // nonconforming compilers will use a different impelementation, in object_traits.hpp
#else
# endif // nonconforming implementations
template <typename T>
struct is_class_impl
{
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_function<T>::value >::value
>::value));
# else
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value
>::value));
# endif
};
#endif // BOOST_TYPE_TRAITS_IS_CLASS_HPP
# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED

View File

@ -0,0 +1,53 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED
#define BOOST_TT_IS_COMPOUND_HPP_INCLUDED
#include "boost/type_traits/is_array.hpp"
#include "boost/type_traits/is_pointer.hpp"
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/is_class.hpp"
#include "boost/type_traits/is_union.hpp"
#include "boost/type_traits/is_enum.hpp"
#include "boost/type_traits/is_member_pointer.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct is_compound_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_array<T>::value,
::boost::is_pointer<T>::value,
::boost::is_reference<T>::value,
::boost::is_class<T>::value,
::boost::is_union<T>::value,
::boost::is_enum<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED

View File

@ -0,0 +1,112 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED
#define BOOST_TT_IS_CONST_HPP_INCLUDED
#include "boost/config.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/cv_traits_impl.hpp"
#else
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/detail/yes_no_type.hpp"
# include "boost/type_traits/detail/false_result.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
//* is a type T declared const - is_const<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp<T*>::is_const)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false)
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const,false)
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 <bool is_ref, bool array>
struct is_const_helper
: ::boost::type_traits::false_result
{
};
template <>
struct is_const_helper<false,false>
{
template <typename T> struct result_
{
static T* t;
BOOST_STATIC_CONSTANT(bool, value = (
sizeof(detail::yes_type) == sizeof(detail::is_const_tester(t))
));
};
};
template <>
struct is_const_helper<false,true>
{
template <typename T> struct result_
{
static T t;
BOOST_STATIC_CONSTANT(bool, value = (
sizeof(detail::yes_type) == sizeof(detail::is_const_tester(&t))
));
};
};
template <typename T>
struct is_const_impl
: is_const_helper<
is_reference<T>::value
, is_array<T>::value
>::template result_<T>
{
};
} // 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
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_CONST_HPP_INCLUDED

View File

@ -0,0 +1,235 @@
// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
// Copyright (C) 2000 Jeremy Siek (jsiek@lsc.nd.edu)
// Copyright (C) 1999, 2000 Jaakko J<>rvi (jaakko.jarvi@cs.utu.fi)
//
// Permission to copy and use this software is granted,
// provided this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
//
#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/config.hpp"
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
# include "boost/type_traits/is_void.hpp"
#endif
// should be always the last #include directive
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
// is one type convertable to another?
//
// there are multiple versions of the is_convertible
// template, almost every compiler seems to require its
// own version.
//
// Thanks to Andrei Alexandrescu for the original version of the
// conversion detection technique!
//
namespace detail {
// MS specific version:
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
// This workaround is necessary to handle when From is void
// which is normally taken care of by the partial specialization
// of the is_convertible typename.
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
template< typename From >
struct does_conversion_exist
{
template< typename To > struct result_
{
static no_type BOOST_TT_DECL _m_check(...);
static yes_type BOOST_TT_DECL _m_check(To);
static From _m_from;
enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
};
};
template<>
struct does_conversion_exist<void>
{
template< typename To > struct result_
{
enum { value = ::boost::is_void<To>::value };
};
};
template <typename From, typename To>
struct is_convertible_impl
: does_conversion_exist<From>::template result_<To>
{
};
#elif defined(__BORLANDC__)
//
// special version for Borland compilers
// this version breaks when used for some
// UDT conversions:
//
template <typename From, typename To>
struct is_convertible_impl
{
#pragma option push -w-8074
// This workaround for Borland breaks the EDG C++ frontend,
// so we only use it for Borland.
template <typename T> struct checker
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T);
};
static From _m_from;
static bool const value = sizeof( checker<To>::_m_check(_m_from) )
== sizeof(::boost::type_traits::yes_type);
#pragma option pop
};
#elif defined(__GNUC__)
// special version for gcc compiler
struct any_conversion
{
template <typename T> any_conversion(const T&);
template <typename T> any_conversion(T&);
};
template <typename T> struct checker
{
static boost::type_traits::no_type _m_check(any_conversion ...);
static boost::type_traits::yes_type _m_check(T, int);
};
template <typename From, typename To>
struct is_convertible_impl
{
static From _m_from;
static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
== sizeof(::boost::type_traits::yes_type);
};
#else
template <typename From, typename To>
struct is_convertible_impl
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
static From _m_from;
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
);
};
#endif // is_convertible_impl
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
//
// Now add the full and partial specialisations
// 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) \
/**/
# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \
TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \
TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \
TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \
TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \
/**/
TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true)
# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2
# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1
#else
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,void,void,true)
#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS
#if defined(__GNUC__)
// Declare specializations of is_convertible for all of the floating
// types to all of the integral types. This suppresses some nasty
// warnings
# define TT_AUX_IS_CONVERTIBLE_SPEC(T1,T2) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,T1,T2,true) \
/**/
# define TT_AUX_IS_CONVERTIBLE_SPEC_2(T1,T2) \
TT_AUX_IS_CONVERTIBLE_SPEC(T1,signed T2) \
TT_AUX_IS_CONVERTIBLE_SPEC(T1,unsigned T2) \
/**/
# define TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F) \
TT_AUX_IS_CONVERTIBLE_SPEC(F,char) \
TT_AUX_IS_CONVERTIBLE_SPEC_2(F,char) \
TT_AUX_IS_CONVERTIBLE_SPEC_2(F,short) \
TT_AUX_IS_CONVERTIBLE_SPEC_2(F,int) \
TT_AUX_IS_CONVERTIBLE_SPEC_2(F,long) \
TT_AUX_IS_CONVERTIBLE_SPEC_2(F,long long) \
/**/
# define TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(F) \
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F const) \
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F volatile) \
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F const volatile) \
/**/
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(float)
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(double)
TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(long double)
# undef TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC
# undef TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC
# undef TT_AUX_IS_CONVERTIBLE_SPEC_2
# undef TT_AUX_IS_CONVERTIBLE_SPEC
#endif // __GNUC__
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED

View File

@ -0,0 +1,198 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_EMPTY_HPP_INCLUDED
#define BOOST_TT_IS_EMPTY_HPP_INCLUDED
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/remove_cv.hpp"
# include "boost/type_traits/is_class.hpp"
# include "boost/type_traits/add_reference.hpp"
#else
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_pointer.hpp"
# include "boost/type_traits/is_member_pointer.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/is_void.hpp"
# include "boost/type_traits/detail/ice_and.hpp"
# include "boost/type_traits/detail/ice_not.hpp"
#endif
// should be always the last #include directive
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct empty_helper_t1 : public T
{
empty_helper_t1(); // hh compiler bug workaround
int i[256];
};
struct empty_helper_t2 { int i[256]; };
#ifndef __BORLANDC__
template <typename T, bool is_a_class = false>
struct empty_helper
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <typename T>
struct empty_helper<T, true>
{
BOOST_STATIC_CONSTANT(
bool, value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2))
);
};
template <typename T>
struct is_empty_impl
{
typedef typename remove_cv<T>::type cvt;
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::type_traits::ice_or<
::boost::detail::empty_helper<cvt,::boost::is_class<T>::value>::value
, BOOST_IS_EMPTY(cvt)
>::value
));
};
#else // __BORLANDC__
template <typename T, bool is_a_class, bool convertible_to_int>
struct empty_helper
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <typename T>
struct empty_helper<T, true, false>
{
BOOST_STATIC_CONSTANT(bool, value = (
sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)
));
};
template <typename T>
struct is_empty_impl
{
typedef typename remove_cv<T>::type cvt;
typedef typename add_reference<T>::type r_type;
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::type_traits::ice_or<
::boost::detail::empty_helper<
cvt
, ::boost::is_class<T>::value
, ::boost::is_convertible< r_type,int>::value
>::value
, BOOST_IS_EMPTY(cvt)
>::value));
};
#endif // __BORLANDC__
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
template <typename T>
struct empty_helper_t1 : public T
{
empty_helper_t1();
int i[256];
};
struct empty_helper_t2 { int i[256]; };
template <typename T>
struct empty_helper_base
{
enum { value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)) };
};
template <typename T>
struct empty_helper_nonbase
{
enum { value = false };
};
template <bool base>
struct empty_helper_chooser
{
template <typename T> struct result_
{
typedef empty_helper_nonbase<T> type;
};
};
template <>
struct empty_helper_chooser<true>
{
template <typename T> struct result_
{
typedef empty_helper_base<T> type;
};
};
template <typename T>
struct is_empty_impl
{
typedef ::boost::detail::empty_helper_chooser<
::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_convertible<T,double>::value >::value,
::boost::type_traits::ice_not< ::boost::is_pointer<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
::boost::type_traits::ice_not<
::boost::is_convertible<T,void const volatile*>::value
>::value
>::value > chooser;
typedef typename chooser::template result_<T> result;
typedef typename result::type eh_type;
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<eh_type::value, BOOST_IS_EMPTY(T)>::value));
};
#else
template <typename T> struct is_empty_impl
{
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_EMPTY(T));
};
#endif // BOOST_MSVC6_MEMBER_TEMPLATES
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED

View File

@ -0,0 +1,113 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED
#define BOOST_TT_IS_ENUM_HPP_INCLUDED
#include "boost/type_traits/add_reference.hpp"
#include "boost/type_traits/is_arithmetic.hpp"
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/config.hpp"
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
# include "boost/type_traits/is_class.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551))
namespace detail {
struct int_convertible
{
int_convertible(int);
};
// Don't evaluate convertibility to int_convertible unless the type
// is non-arithmetic. This suppresses warnings with GCC.
template <bool is_typename_arithmetic_or_reference = true>
struct is_enum_helper
{
template <typename T> struct type
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
template <>
struct is_enum_helper<false>
{
template <typename T> struct type
: ::boost::is_convertible<T,::boost::detail::int_convertible>
{
};
};
template <typename T> struct is_enum_impl
{
typedef ::boost::add_reference<T> ar_t;
typedef typename ar_t::type r_type;
#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION)
BOOST_STATIC_CONSTANT(bool, selector =
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value
, ::boost::is_reference<T>::value
// We MUST do this on conforming compilers in order to
// correctly deduce that noncopyable types are not enums (dwa
// 2002/04/15)...
, ::boost::is_class<T>::value
>::value));
#else
BOOST_STATIC_CONSTANT(bool, selector =
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value
, ::boost::is_reference<T>::value
// However, not doing this on non-conforming compilers prevents
// a dependency recursion.
>::value));
#endif
#ifdef __BORLANDC__
typedef ::boost::detail::is_enum_helper< ::boost::is_enum<T>::selector> se_t;
#else
typedef ::boost::detail::is_enum_helper<selector> se_t;
#endif
typedef typename se_t::template type<r_type> helper;
BOOST_STATIC_CONSTANT(bool, value = helper::value);
};
} // 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)
#else // __BORLANDC__
//
// buggy is_convertible prevents working
// implementation of is_enum:
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T))
#endif
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_ENUM_HPP_INCLUDED

View File

@ -0,0 +1,28 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
//* is a type T a floating-point type described in the standard (3.9.1p8)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_float,T,false)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,float,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,double,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,long double,true)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED

View File

@ -0,0 +1,85 @@
// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
// Copyright (C) 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
//
// Permission to copy and use this software is granted,
// provided this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED
#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/detail/false_result.hpp"
#include "boost/config.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/is_function_ptr_helper.hpp"
#else
# include "boost/type_traits/detail/is_function_ptr_tester.hpp"
# include "boost/type_traits/detail/yes_no_type.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
// is a type a function?
// Please note that this implementation is unnecessarily complex:
// we could just use !is_convertible<T*, const volatile void*>::value,
// except that some compilers erroneously allow conversions from
// function pointers to void*.
namespace boost {
namespace detail {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<bool is_ref = true>
struct is_function_chooser
: ::boost::type_traits::false_result
{
};
template <>
struct is_function_chooser<false>
{
template< typename T > struct result_
: ::boost::type_traits::is_function_ptr_helper<T*>
{
};
};
template <typename T>
struct is_function_impl
: is_function_chooser< ::boost::is_reference<T>::value >
::template result_<T>
{
};
#else
template <typename T>
struct is_function_impl
{
static T* t;
BOOST_STATIC_CONSTANT(
bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
== sizeof(::boost::type_traits::yes_type)
);
};
#endif
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
#define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
#include "boost/type_traits/is_arithmetic.hpp"
#include "boost/type_traits/is_void.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct is_fundamental_impl
: ::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value
, ::boost::is_void<T>::value
>
{
};
} // namespace detail
//* is a type T a fundamental type described in the standard (3.9.1)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED

View File

@ -0,0 +1,54 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
// as an extention we include long long, as this is likely to be added to the
// standard at a later date
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true)
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
#endif
# if defined(BOOST_HAS_LONG_LONG)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long long,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,long long,true)
#elif defined(BOOST_HAS_MS_INT64)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
#endif
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED

View File

@ -79,21 +79,25 @@ struct is_mem_fun_pointer_impl
#else // Borland C++
namespace detail {
template <typename T>
struct is_member_function_pointer_impl
struct is_mem_fun_pointer_impl
{
static T& m_t;
BOOST_STATIC_CONSTANT(
bool, value =
(1 == sizeof(detail::is_member_function_pointer_helper(m_t))) );
(1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
};
template <typename T>
struct is_member_function_pointer_impl<T&>
struct is_mem_fun_pointer_impl<T&>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
} // namespace detail
#endif
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_mem_fun_pointer_impl<T>::value)

View File

@ -0,0 +1,96 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
# include "boost/type_traits/is_member_function_pointer.hpp"
#else
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp"
# include "boost/type_traits/detail/yes_no_type.hpp"
# include "boost/type_traits/detail/false_result.hpp"
# include "boost/type_traits/detail/ice_or.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#if defined(__BORLANDC__)
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)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
#else // no partial template specialization
namespace detail {
template <typename R, typename T>
::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*);
::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...);
template <bool>
struct is_member_pointer_select
: ::boost::type_traits::false_result
{
};
template <>
struct is_member_pointer_select<false>
{
template <typename T> 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 <typename T>
struct is_member_pointer_impl
: is_member_pointer_select<
::boost::type_traits::ice_or<
::boost::is_reference<T>::value
, ::boost::is_array<T>::value
>::value
>::template result_<T>
{
};
} // 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__
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED

View File

@ -0,0 +1,54 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED
#define BOOST_TT_IS_OBJECT_HPP_INCLUDED
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/is_void.hpp"
#include "boost/type_traits/is_function.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct is_object_impl
{
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_function<T>::value>::value
>::value));
#else
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value
>::value));
#endif
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_object,T,::boost::detail::is_object_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED

View File

@ -0,0 +1,123 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_POD_HPP_INCLUDED
#define BOOST_TT_IS_POD_HPP_INCLUDED
#include "boost/type_traits/is_void.hpp"
#include "boost/type_traits/is_scalar.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
// 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
{
BOOST_STATIC_CONSTANT(
bool, value =
(::boost::type_traits::ice_or<
::boost::is_scalar<T>::value,
::boost::is_void<T>::value,
BOOST_IS_POD(T)
>::value));
};
template <typename T, std::size_t sz>
struct is_POD_impl<T[sz]>
: is_POD_impl<T>
{
};
#else
template <bool is_array = false>
struct is_POD_helper
{
template <typename T> struct result_
{
BOOST_STATIC_CONSTANT(
bool, value =
(::boost::type_traits::ice_or<
::boost::is_scalar<T>::value,
::boost::is_void<T>::value,
BOOST_IS_POD(T)
>::value));
};
};
template <bool b>
struct bool_to_yes_no_type
{
typedef ::boost::type_traits::no_type type;
};
template <>
struct bool_to_yes_no_type<true>
{
typedef ::boost::type_traits::yes_type type;
};
template <typename ArrayType>
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;
type instance() const;
};
template <typename T>
is_POD_array_helper<T> is_POD_array(T*);
template <>
struct is_POD_helper<true>
{
template <typename T> struct result_
{
static T& help();
BOOST_STATIC_CONSTANT(bool, value =
sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type)
);
};
};
template <typename T> struct is_POD_impl
{
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::detail::is_POD_helper<
::boost::is_array<T>::value
>::template result_<T>::value
)
);
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_POD_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_POD_HPP_INCLUDED

View File

@ -0,0 +1,132 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED
#define BOOST_TT_IS_POINTER_HPP_INCLUDED
#include "boost/type_traits/is_member_pointer.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
#include "boost/type_traits/config.hpp"
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/detail/is_function_ptr_tester.hpp"
# include "boost/type_traits/detail/false_result.hpp"
# include "boost/type_traits/detail/ice_or.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail {
template< typename T > struct is_pointer_helper
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
# define TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(helper,sp,result) \
template< typename T > struct helper<sp> \
{ \
BOOST_STATIC_CONSTANT(bool, value = result); \
}; \
/**/
TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true)
TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const,true)
TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* volatile,true)
TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const volatile,true)
# undef TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC
template< typename T >
struct is_pointer_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::detail::is_pointer_helper<T>::value
, ::boost::type_traits::ice_not<
::boost::is_member_pointer<T>::value
>::value
>::value)
);
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
#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 <bool>
struct is_pointer_select
: ::boost::type_traits::false_result
{
};
template <>
struct is_pointer_select<false>
{
template <typename T> 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 <typename T>
struct is_pointer_impl
: is_pointer_select<
::boost::type_traits::ice_or<
::boost::is_reference<T>::value
, ::boost::is_array<T>::value
>::value
>::template result_<T>
{
};
} // 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
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED

View File

@ -0,0 +1,95 @@
// (C) Copyright David Abrahams Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000-2002. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED
#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/yes_no_type.hpp"
# include "boost/type_traits/detail/wrap.hpp"
#endif
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC)
# include "boost/type_traits/detail/is_function_type_tester.hpp"
# include "boost/type_traits/detail/false_result.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true)
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const,true)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& volatile,true)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const volatile,true)
#endif
#else
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4181)
#endif
namespace detail {
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
using ::boost::type_traits::wrap;
template <class T> T&(* is_reference_helper1(wrap<T>) )(wrap<T>);
char is_reference_helper1(...);
template <class T> no_type is_reference_helper2(T&(*)(wrap<T>));
yes_type is_reference_helper2(...);
template <typename T>
struct is_reference_impl
{
BOOST_STATIC_CONSTANT(
bool, value = sizeof(
::boost::detail::is_reference_helper2(
::boost::detail::is_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
);
};
} // 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)
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED

View File

@ -0,0 +1,81 @@
// (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy,
// Howard Hinnant & John Maddock 2000.
// 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, and
// with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED
#define BOOST_TT_IS_SAME_HPP_INCLUDED
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true)
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail {
#ifdef BOOST_MSVC
// the following VC6 specific implementation is *NOT* legal
// C++, but has the advantage that it works for incomplete
// types.
template< typename T1 >
struct is_same_part_1
{
template<typename T2> struct part_2 { enum { value = false }; };
template<> struct part_2<T1> { enum { value = true }; };
};
template< typename T1, typename T2 >
struct is_same_impl
{
enum { value = detail::is_same_part_1<T1>::template part_2<T2>::value };
};
#else // generic "no-partial-specialization" version
template <typename T>
::boost::type_traits::yes_type
BOOST_TT_DECL is_same_tester(T*, T*);
::boost::type_traits::no_type
BOOST_TT_DECL is_same_tester(...);
template <typename T, typename U>
struct is_same_impl
{
static T t;
static U u;
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
(sizeof(type_traits::yes_type) == sizeof(detail::is_same_tester(&t,&u))),
(::boost::is_reference<T>::value == ::boost::is_reference<U>::value),
(sizeof(T) == sizeof(U))
>::value));
};
#endif // BOOST_MSVC
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl<T,U>::value))
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_SAME_HPP_INCLUDED

View File

@ -0,0 +1,47 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED
#define BOOST_TT_IS_SCALAR_HPP_INCLUDED
#include "boost/type_traits/is_arithmetic.hpp"
#include "boost/type_traits/is_enum.hpp"
#include "boost/type_traits/is_pointer.hpp"
#include "boost/type_traits/is_member_pointer.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct is_scalar_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value,
::boost::is_enum<T>::value,
::boost::is_pointer<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED

View File

@ -0,0 +1,49 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED
#define BOOST_TT_IS_STATELESS_HPP_INCLUDED
#include "boost/type_traits/has_trivial_constructor.hpp"
#include "boost/type_traits/has_trivial_copy.hpp"
#include "boost/type_traits/has_trivial_destructor.hpp"
#include "boost/type_traits/is_class.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T>
struct is_stateless_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::has_trivial_constructor<T>::value,
::boost::has_trivial_copy<T>::value,
::boost::has_trivial_destructor<T>::value,
::boost::is_class<T>::value,
::boost::is_empty<T>::value
>::value));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED

View File

@ -0,0 +1,36 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_UNION_HPP_INCLUDED
#define BOOST_TT_IS_UNION_HPP_INCLUDED
#include "boost/type_traits/remove_cv.hpp"
#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail {
template <typename T> struct is_union_impl
{
typedef typename remove_cv<T>::type cvt;
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
};
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl<T>::value)
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_UNION_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_VOID_HPP_INCLUDED
#define BOOST_TT_IS_VOID_HPP_INCLUDED
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
//* is a type T void - is_void<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false)
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const,true)
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true)
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true)
#endif
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_VOID_HPP_INCLUDED

View File

@ -0,0 +1,112 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED
#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED
#include "boost/config.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/cv_traits_impl.hpp"
#else
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/detail/yes_no_type.hpp"
# include "boost/type_traits/detail/false_result.hpp"
#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
//* is a type T declared volatile - is_volatile<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<T*>::is_volatile)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false)
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const,false)
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 <bool is_ref, bool array>
struct is_volatile_helper
: ::boost::type_traits::false_result
{
};
template <>
struct is_volatile_helper<false,false>
{
template <typename T> struct result_
{
static T* t;
BOOST_STATIC_CONSTANT(bool, value = (
sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(t))
));
};
};
template <>
struct is_volatile_helper<false,true>
{
template <typename T> struct result_
{
static T t;
BOOST_STATIC_CONSTANT(bool, value = (
sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(&t))
));
};
};
template <typename T>
struct is_volatile_impl
: is_volatile_helper<
is_reference<T>::value
, is_array<T>::value
>::template result_<T>
{
};
} // 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
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED

View File

@ -12,551 +12,23 @@
// has_trivial_destructor, is_empty.
//
#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP
#define BOOST_OBJECT_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP
#include <boost/type_traits/composite_traits.hpp>
#endif
#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
#ifndef BOOST_FUNCTION_TYPE_TRAITS_HPP
#include <boost/type_traits/function_traits.hpp>
#endif
#ifndef BOOST_TYPE_TRAITS_IS_CLASS_HPP
# include <boost/type_traits/is_class.hpp>
#endif
#ifdef BOOST_HAS_SGI_TYPE_TRAITS
# include <type_traits.h>
# include <boost/type_traits/same_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* is_object
*
**********************************************/
template <typename T>
struct is_object
{
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_function<T>::value>::value
>::value));
#else
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value
>::value));
#endif
};
/**********************************************
*
* is_scalar
*
**********************************************/
template <typename T>
struct is_scalar
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value,
::boost::is_enum<T>::value,
::boost::is_pointer<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
# ifndef BOOST_TYPE_TRAITS_IS_CLASS_DEFINED
// conforming compilers use the implementation in <boost/type_traits/is_class.hpp>
/**********************************************
*
* is_class
*
**********************************************/
template <typename T>
struct is_class
{
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_function<T>::value >::value
>::value));
# else
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value
>::value));
# endif
};
# endif // nonconforming implementations
/**********************************************
*
* is_compound
*
**********************************************/
template <typename T> struct is_compound
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_array<T>::value,
::boost::is_pointer<T>::value,
::boost::is_reference<T>::value,
::boost::is_class<T>::value,
::boost::is_union<T>::value,
::boost::is_enum<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
/**********************************************
*
* is_POD
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_POD
{
BOOST_STATIC_CONSTANT(
bool, value =
(::boost::type_traits::ice_or<
::boost::is_scalar<T>::value,
::boost::is_void<T>::value,
BOOST_IS_POD(T)
>::value));
};
template <typename T, std::size_t sz>
struct is_POD<T[sz]>
{
BOOST_STATIC_CONSTANT(bool, value = ::boost::is_POD<T>::value);
};
#else
namespace detail
{
template <bool is_array = false> struct is_POD_helper;
}
template <typename T> struct is_POD
{
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::detail::is_POD_helper<
::boost::is_array<T>::value
>::template apply<T>::value
)
);
};
namespace detail
{
template <bool is_array>
struct is_POD_helper
{
template <typename T> struct apply
{
BOOST_STATIC_CONSTANT(
bool, value =
(::boost::type_traits::ice_or<
::boost::is_scalar<T>::value,
::boost::is_void<T>::value,
BOOST_IS_POD(T)
>::value));
};
};
template <bool b>
struct bool_to_type
{
typedef ::boost::type_traits::no_type type;
};
template <>
struct bool_to_type<true>
{
typedef ::boost::type_traits::yes_type type;
};
template <class ArrayType>
struct is_POD_array_helper
{
typedef
#if !defined(__BORLANDC__) || __BORLANDC__ > 0x551
typename
#endif
::boost::detail::bool_to_type<(::boost::is_POD<ArrayType>::value)>::type type;
type instance() const;
};
template <class T>
is_POD_array_helper<T> is_POD_array(T*);
template <>
struct is_POD_helper<true>
{
template <typename T> struct apply
{
static T& help();
BOOST_STATIC_CONSTANT(
bool, value =
sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type));
};
};
}
#endif
/**********************************************
*
* has_trivial_constructor
*
**********************************************/
template <typename T>
struct has_trivial_constructor
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
>::value));
};
/**********************************************
*
* has_trivial_copy
*
**********************************************/
template <typename T>
struct has_trivial_copy
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_COPY(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
>::value));
};
/**********************************************
*
* has_trivial_assign
*
**********************************************/
template <typename T>
struct has_trivial_assign
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_ASSIGN(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
>::value));
};
/**********************************************
*
* has_trivial_destructor
*
**********************************************/
template <typename T>
struct has_trivial_destructor
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
>::value));
};
/**********************************************
*
* has_nothrow_constructor
*
**********************************************/
template <typename T>
struct has_nothrow_constructor
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::has_trivial_constructor<T>::value));
};
/**********************************************
*
* has_nothrow_copy
*
**********************************************/
template <typename T>
struct has_nothrow_copy
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::has_trivial_copy<T>::value));
};
/**********************************************
*
* has_nothrow_assign
*
**********************************************/
template <typename T>
struct has_nothrow_assign
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::has_trivial_assign<T>::value));
};
/**********************************************
*
* is_empty
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail
{
template <typename T>
struct empty_helper_t1 : public T
{
//#ifdef __MWERKS__
empty_helper_t1(); // hh compiler bug workaround
//#endif
int i[256];
};
struct empty_helper_t2 { int i[256]; };
}
# ifndef __BORLANDC__
namespace detail
{
template <typename T, bool is_a_class = false>
struct empty_helper{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T>
struct empty_helper<T, true>
{
BOOST_STATIC_CONSTANT(
bool, value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)));
};
}
template <typename T>
struct is_empty
{
private:
typedef typename remove_cv<T>::type cvt;
public:
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::type_traits::ice_or<
::boost::detail::empty_helper<T,::boost::is_class<T>::value>::value
, BOOST_IS_EMPTY(cvt)
>::value
));
};
# else // __BORLANDC__
namespace detail
{
template <typename T, bool is_a_class, bool convertible_to_int>
struct empty_helper{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T>
struct empty_helper<T, true, false>
{
BOOST_STATIC_CONSTANT(bool, value =
(sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)));
};
}
template <typename T>
struct is_empty
{
private:
typedef typename remove_cv<T>::type cvt;
typedef typename add_reference<T>::type r_type;
public:
BOOST_STATIC_CONSTANT(
bool, value = (
::boost::type_traits::ice_or<
::boost::detail::empty_helper<
T
, ::boost::is_class<T>::value
, ::boost::is_convertible< r_type,int>::value
>::value
, BOOST_IS_EMPTY(cvt)
>::value));
};
# endif // __BORLANDC__
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
namespace detail{
template <typename T>
struct empty_helper_t1 : public T
{
empty_helper_t1();
int i[256];
};
struct empty_helper_t2 { int i[256]; };
template <typename T>
struct empty_helper_base
{
enum{ value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)) };
};
template <typename T>
struct empty_helper_nonbase
{
enum{ value = false };
};
template <bool base>
struct empty_helper_chooser
{
template <class T>
struct rebind
{
typedef empty_helper_nonbase<T> type;
};
};
template <>
struct empty_helper_chooser<true>
{
template <class T>
struct rebind
{
typedef empty_helper_base<T> type;
};
};
} // namespace detail
template <typename T>
struct is_empty
{
private:
typedef ::boost::detail::empty_helper_chooser<
::boost::type_traits::ice_and<
::boost::type_traits::ice_not<
::boost::is_reference<T>::value>::value,
::boost::type_traits::ice_not<
::boost::is_convertible<T,double>::value>::value,
::boost::type_traits::ice_not<
::boost::is_pointer<T>::value>::value,
::boost::type_traits::ice_not<
::boost::is_member_pointer<T>::value>::value,
::boost::type_traits::ice_not<
::boost::is_array<T>::value>::value,
::boost::type_traits::ice_not<
::boost::is_void<T>::value>::value,
::boost::type_traits::ice_not<
::boost::is_convertible<T, const volatile void*>::value>::value
>::value> chooser;
typedef typename chooser::template rebind<T> bound_type;
typedef typename bound_type::type eh_type;
public:
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<eh_type::value, BOOST_IS_EMPTY(T)>::value));
};
#else
template <typename T> struct is_empty
{ enum{ value = BOOST_IS_EMPTY(T) }; };
#endif // BOOST_MSVC6_MEMBER_TEMPLATES
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
/**********************************************
*
* is_stateless
*
**********************************************/
template <typename T>
struct is_stateless
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::has_trivial_constructor<T>::value,
::boost::has_trivial_copy<T>::value,
::boost::has_trivial_destructor<T>::value,
::boost::is_class<T>::value,
::boost::is_empty<T>::value
>::value));
};
template <class Base, class Derived>
struct is_base_and_derived
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::is_convertible<Derived*,Base*>::value,
::boost::is_class<Derived>::value,
::boost::is_class<Base>::value
>::value)
);
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class Base, class Derived>
struct is_base_and_derived<Base&, Derived>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class Base, class Derived>
struct is_base_and_derived<Base, Derived&>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
template <class Base, class Derived>
struct is_base_and_derived<Base&, Derived&>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#endif
} // namespace boost
#endif // BOOST_OBJECT_TYPE_TRAITS_HPP
#ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
#define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
#include "boost/type_traits/has_trivial_assign.hpp"
#include "boost/type_traits/has_trivial_constructor.hpp"
#include "boost/type_traits/has_trivial_copy.hpp"
#include "boost/type_traits/has_trivial_destructor.hpp"
#include "boost/type_traits/has_nothrow_constructor.hpp"
#include "boost/type_traits/has_nothrow_copy.hpp"
#include "boost/type_traits/has_nothrow_assign.hpp"
#include "boost/type_traits/is_base_and_derived.hpp"
#include "boost/type_traits/is_class.hpp"
#include "boost/type_traits/is_compound.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_object.hpp"
#include "boost/type_traits/is_POD.hpp"
#include "boost/type_traits/is_scalar.hpp"
#include "boost/type_traits/is_stateless.hpp"
#endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED

View File

@ -6,85 +6,10 @@
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
//
#ifndef BOOST_TT_REFERENCE_TRAITS_HPP
# define BOOST_TT_REFERENCE_TRAITS_HPP
# ifndef BOOST_TT_UTILITY_HPP
# include <boost/type_traits/utility.hpp>
# endif // BOOST_TT_UTILITY_HPP
#ifndef BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED
#define BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED
namespace boost {
#include "boost/type_traits/is_reference.hpp"
/**********************************************
*
* is_reference
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_reference
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T> struct is_reference<T&>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T> struct is_reference<T&const>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <typename T> struct is_reference<T&volatile>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <typename T> struct is_reference<T&const volatile>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#else
# ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4181)
#endif // BOOST_MSVC
namespace detail
{
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
using ::boost::type_traits::wrap;
template <class T> T&(* is_reference_helper1(wrap<T>) )(wrap<T>);
char is_reference_helper1(...);
template <class T> no_type is_reference_helper2(T&(*)(wrap<T>));
yes_type is_reference_helper2(...);
}
template <typename T>
struct is_reference
{
BOOST_STATIC_CONSTANT(
bool, value = sizeof(
::boost::detail::is_reference_helper2(
::boost::detail::is_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
);
};
template <> struct is_reference<void>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct is_reference<const void>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <> struct is_reference<volatile void>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <> struct is_reference<const volatile void>
{ BOOST_STATIC_CONSTANT(bool, value = false); };
#endif
# ifdef BOOST_MSVC
# pragma warning(pop)
# endif // BOOST_MSVC
#endif
} // namespace boost::type_traits
#endif // BOOST_TT_REFERENCE_TRAITS_HPP
#endif // BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
#include "boost/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T)
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type)
#endif
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED

View File

@ -0,0 +1,71 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED
#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/broken_compiler_spec.hpp"
#include "boost/type_traits/detail/cv_traits_impl.hpp"
#include "boost/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail {
template <typename T, bool is_vol>
struct remove_const_helper
{
typedef T type;
};
template <typename T>
struct remove_const_helper<T, true>
{
typedef T volatile type;
};
template <typename T>
struct remove_const_impl
{
typedef typename remove_const_helper<
typename cv_traits_imp<T*>::unqualified_type
, ::boost::is_volatile<T>::value
>::type type;
};
} // namespace detail
// * convert a type T to non-const type - remove_const<T>
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename detail::remove_const_impl<T>::type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_const,T&,T&)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const[N],T type[N])
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N])
#else
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,T)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED

View File

@ -0,0 +1,45 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED
#define BOOST_TT_REMOVE_CV_HPP_INCLUDED
#include "boost/type_traits/broken_compiler_spec.hpp"
#include "boost/type_traits/detail/cv_traits_impl.hpp"
#include "boost/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// convert a type T to a non-cv-qualified type - remove_cv<T>
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::cv_traits_imp<T*>::unqualified_type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N])
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N])
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N])
#else
// doesn't work
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,T)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
#include "boost/type_traits/broken_compiler_spec.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
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)
#endif
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// 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, and with no claim
// as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
#define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
#include "boost/type_traits/broken_compiler_spec.hpp"
#include "boost/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T)
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED

View File

@ -0,0 +1,71 @@
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000. 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, and with no claim as
// to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/broken_compiler_spec.hpp"
#include "boost/type_traits/detail/cv_traits_impl.hpp"
#include "boost/config.hpp"
#include <cstddef>
// should be the last #include
#include "boost/type_traits/detail/type_trait_def.hpp"
namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail {
template <typename T, bool is_const>
struct remove_volatile_helper
{
typedef T type;
};
template <typename T>
struct remove_volatile_helper<T,true>
{
typedef T const type;
};
template <typename T>
struct remove_volatile_impl
{
typedef typename remove_volatile_helper<
typename cv_traits_imp<T*>::unqualified_type
, ::boost::is_const<T>::value
>::type type;
};
} // namespace detail
// * convert a type T to a non-volatile type - remove_volatile<T>
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N])
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N])
#else
// doesn't work
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,T)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED

View File

@ -8,101 +8,9 @@
//
// defines is_same:
// Revision History
// 19 Feb 2001 Fixed for MSVC (David Abrahams)
#ifndef BOOST_SAME_TRAITS_HPP
#define BOOST_SAME_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#if !defined(BOOST_COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC)
#include <boost/type_traits/composite_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* is_same
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T, typename U>
struct is_same
{ BOOST_STATIC_CONSTANT(bool, value = false); };
template <typename T>
struct is_same<T, T>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// A definition is required even for integral static constants
template <typename T, typename U>
const bool is_same<T, U>::value;
template <typename T>
const bool is_same<T, T>::value;
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
//
// the following VC6 specific implementation is *NOT* legal
// C++, but has the advantage that it works for incomplete
// types.
//
namespace detail{
template<class T1>
struct is_same_part_1 {
template<class T2> struct part_2 { enum { value = false }; };
template<> struct part_2<T1> { enum { value = true }; };
};
} // namespace detail
template<class T1, class T2>
struct is_same {
enum { value = detail::is_same_part_1<T1>::template part_2<T2>::value };
};
#else // BOOST_MSVC
namespace detail{
template <class T>
::boost::type_traits::yes_type BOOST_TT_DECL is_same_helper(T*, T*);
::boost::type_traits::no_type BOOST_TT_DECL is_same_helper(...);
}
template <typename T, typename U>
struct is_same
{
private:
static T t;
static U u;
public:
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
(sizeof(type_traits::yes_type) == sizeof(detail::is_same_helper(&t,&u))),
(::boost::is_reference<T>::value == ::boost::is_reference<U>::value),
(sizeof(T) == sizeof(U))
>::value));
};
#endif // BOOST_MSVC
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#endif // BOOST_SAME_TRAITS_HPP
#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED
#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED
#include "boost/type_traits/is_same.hpp"
#endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED

View File

@ -9,191 +9,14 @@
// defines traits classes for transforming one type to another:
// remove_reference, add_reference, remove_bounds, remove_pointer.
//
// Revision History:
// 21st March 2001
// Added void specialisations to add_reference.
#ifndef BOOST_TRANSFORM_TRAITS_HPP
#define BOOST_TRANSFORM_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#if !defined(BOOST_COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/composite_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* remove_reference
*
**********************************************/
template <typename T>
struct remove_reference
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct remove_reference<T&>
{ typedef T type; };
#endif
#if defined(__BORLANDC__) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T>
struct remove_reference<T&const>
{ typedef T type; };
template <typename T>
struct remove_reference<T&volatile>
{ typedef T type; };
template <typename T>
struct remove_reference<T&const volatile>
{ typedef T type; };
#endif
/**********************************************
*
* add_reference
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct add_reference
{ typedef T& type; };
template <typename T>
struct add_reference<T&>
{ typedef T& type; };
#elif defined(BOOST_MSVC6_MEMBER_TEMPLATES)
namespace detail{
template <bool x>
struct reference_adder
{
template <class T>
struct rebind
{
typedef T& type;
};
};
template <>
struct reference_adder<true>
{
template <class T>
struct rebind
{
typedef T type;
};
};
} // namespace detail
template <typename T>
struct add_reference
{
private:
typedef typename detail::reference_adder< ::boost::is_reference<T>::value>::template rebind<T> binder;
public:
typedef typename binder::type type;
};
#else
template <typename T>
struct add_reference
{ typedef T& type; };
#endif
//
// these full specialisations are always required:
template <> struct add_reference<void>{ typedef void type; };
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct add_reference<const volatile void>{ typedef const volatile void type; };
template <> struct add_reference<const void>{ typedef const void type; };
template <> struct add_reference<volatile void>{ typedef volatile void type; };
#endif
/**********************************************
*
* remove_bounds
*
**********************************************/
template <typename T>
struct remove_bounds
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T, std::size_t N>
struct remove_bounds<T[N]>
{ typedef T type; };
template <typename T, std::size_t N>
struct remove_bounds<const T[N]>
{ typedef const T type; };
template <typename T, std::size_t N>
struct remove_bounds<volatile T[N]>
{ typedef volatile T type; };
template <typename T, std::size_t N>
struct remove_bounds<const volatile T[N]>
{ typedef const volatile T type; };
#endif
/**********************************************
*
* remove_pointer
*
**********************************************/
template <typename T>
struct remove_pointer
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct remove_pointer<T*>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*const>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*volatile>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*const volatile>
{ typedef T type; };
#endif
/**********************************************
*
* add_pointer
*
**********************************************/
template <typename T>
struct add_pointer
{
private:
typedef typename remove_reference<T>::type no_ref_type;
public:
typedef no_ref_type* type;
};
} // namespace boost
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
//
// if there is no partial specialisation support
// include a bunch of full specialisations as a workaround:
//
#include <boost/type_traits/transform_traits_spec.hpp>
#else
#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x)
#endif
#endif // BOOST_TRANSFORM_TRAITS_HPP
#ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
#define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
#include "boost/type_traits/add_pointer.hpp"
#include "boost/type_traits/add_reference.hpp"
#include "boost/type_traits/remove_bounds.hpp"
#include "boost/type_traits/remove_pointer.hpp"
#include "boost/type_traits/remove_reference.hpp"
#endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED

View File

@ -5,74 +5,9 @@
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
#ifndef BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP
#define BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP
#ifndef BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED
#define BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED
#ifndef TRANSFORM_TRAITS_HPP
#include <boost/type_traits/transform_traits.hpp>
#endif
#define BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_CONST_VOLATILE_RANK1(T) \
template<> struct remove_const<T const> { typedef T type; }; \
template<> struct remove_const<T const volatile> { typedef T volatile type; }; \
template<> struct remove_volatile<T volatile> { typedef T type; }; \
template<> struct remove_volatile<T const volatile> { typedef T const type; }; \
template<> struct remove_cv<T const> { typedef T type; }; \
template<> struct remove_cv<T volatile> { typedef T type; }; \
template<> struct remove_cv<T const volatile> { typedef T type; }; \
/**/
#define BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_1(T) \
template<> struct remove_pointer<T*> { typedef T type; }; \
template<> struct remove_reference<T&> { typedef T type; }; \
/**/
#define BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_2(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_1(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_1(T const) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_1(T volatile) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_1(T const volatile) \
/**/
#define BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_PTR_REF_RANK_2(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_CONST_VOLATILE_RANK1(T) \
/**/
#define BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T const*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T volatile*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T const volatile*) \
/**/
#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \
namespace boost { \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_1(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T const*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T volatile*) \
BOOST_TYPE_TRAITS_SPECIALIZATION_REMOVE_ALL_RANK_2(T const volatile*) \
} \
/**/
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(bool)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(char)
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(wchar_t)
#endif
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(signed char)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(unsigned char)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(signed short)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(unsigned short)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(signed int)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(unsigned int)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(signed long)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(unsigned long)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(float)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(double)
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(long double)
#endif // BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP
#include "boost/type_traits/broken_compiler_spec.hpp"
#endif // BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED

View File

@ -9,11 +9,16 @@
#ifndef BOOST_TYPE_TRAITS_TEST_HPP
#define BOOST_TYPE_TRAITS_TEST_HPP
#include "boost/config.hpp"
#include "boost/utility.hpp"
#include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
#include "boost/type_traits/ice.hpp"
#include <iostream>
#include <typeinfo>
#include <boost/config.hpp>
#include <boost/utility.hpp>
#include <boost/type_traits/alignment_traits.hpp>
//
// define tests here
unsigned failures = 0;
@ -156,6 +161,7 @@ struct test_align
char c;
T t;
};
static void do_it()
{
padded p;
@ -169,9 +175,12 @@ struct test_align
std::cout << "\tfound: " << boost::alignment_of<T>::value << " expected " << a << std::endl;
}
// suppress warnings about unused variables:
(void)p;
(void)a;
not_unused(p);
not_unused(a);
}
template <class U>
static void not_unused(U const&) {}
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
@ -422,13 +431,3 @@ struct incomplete_type;
#endif // BOOST_TYPE_TRAITS_TEST_HPP

View File

@ -0,0 +1,106 @@
// (C) Copyright John Maddock 2000.
// 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,
// and with no claim as to its suitability for any purpose.
#ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
#define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
#include "boost/mpl/if.hpp"
#include "boost/preprocessor/list/for_each_i.hpp"
#include "boost/preprocessor/tuple/to_list.hpp"
#include "boost/preprocessor/cat.hpp"
#include "boost/type_traits/alignment_of.hpp"
#include "boost/static_assert.hpp"
#include "boost/config.hpp"
#include <cstddef>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4121) // alignment is sensitive to packing
#endif
namespace boost {
namespace detail {
class alignment_dummy;
typedef void (*function_ptr)();
typedef int (alignment_dummy::*member_ptr);
typedef int (alignment_dummy::*member_function_ptr)();
#define BOOST_TT_ALIGNMENT_TYPES BOOST_PP_TUPLE_TO_LIST( \
11, ( \
char, short, int, long, float, double, long double \
, void*, function_ptr, member_ptr, member_function_ptr))
#define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \
typename mpl::if_c< \
alignment_of<T>::value <= target, T, char>::type BOOST_PP_CAT(t,I);
#define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I);
template <std::size_t target>
union lower_alignment
{
BOOST_PP_LIST_FOR_EACH_I(
BOOST_TT_CHOOSE_MIN_ALIGNMENT
, ignored
, BOOST_TT_ALIGNMENT_TYPES
)
};
union max_align
{
BOOST_PP_LIST_FOR_EACH_I(
BOOST_TT_CHOOSE_T
, ignored
, BOOST_TT_ALIGNMENT_TYPES
)
};
#undef BOOST_TT_ALIGNMENT_TYPES
#undef BOOST_TT_CHOOSE_MIN_ALIGNMENT
#undef BOOST_TT_CHOOSE_T
template<int TAlign, int Align>
struct is_aligned
{
BOOST_STATIC_CONSTANT(bool,
value = (TAlign >= Align) & (TAlign % Align == 0)
);
};
} // namespace detail
// This alignment method originally due to Brian Parker, implemented by David
// Abrahams, and then ported here by Doug Gregor.
template <int Align>
class type_with_alignment
{
typedef detail::lower_alignment<Align> t1;
typedef typename mpl::if_c<
::boost::detail::is_aligned< ::boost::alignment_of<t1>::value,Align >::value
, t1
, detail::max_align
>::type align_t;
BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of<align_t>::value);
BOOST_STATIC_ASSERT(found >= Align);
BOOST_STATIC_ASSERT(found % Align == 0);
public:
typedef align_t type;
};
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED

View File

@ -1,24 +0,0 @@
// Copyright David Abrahams 2002. 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, and with no claim as
// to its suitability for any purpose.
#ifndef BOOST_TT_UTILITY_HPP
# define BOOST_TT_UTILITY_HPP
namespace boost { namespace type_traits
{
// Utility metafunction class which always returns false
struct false_unary_metafunction
{
template <class T>
struct apply
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
template <class T> struct wrap {};
}} // namespace boost::type_traits
#endif // BOOST_TT_UTILITY_HPP