forked from boostorg/type_traits
added type trait extension to operator detection
[SVN r74782]
This commit is contained in:
1 parent
360373e3ee
commit
6e2fae44d4
290 files changed
+27273
-666
No files matched your search
@@ -89,6 +89,18 @@ public:\
|
||||
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \
|
||||
template< typename T1, typename T2, typename T3 > struct trait \
|
||||
BOOST_TT_AUX_BOOL_C_BASE(C) \
|
||||
{ \
|
||||
public:\
|
||||
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \
|
||||
}; \
|
||||
\
|
||||
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \
|
||||
/**/
|
||||
|
||||
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
|
||||
template<> struct trait< sp > \
|
||||
BOOST_TT_AUX_BOOL_C_BASE(C) \
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#undef BOOST_TT_AUX_BOOL_C_BASE
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
|
||||
#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/ice.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
// should be the last #include
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
// cannot include this header without getting warnings of the kind:
|
||||
// gcc:
|
||||
// warning: value computed is not used
|
||||
// warning: comparison between signed and unsigned integer expressions
|
||||
// msvc:
|
||||
// warning C4018: '<' : signed/unsigned mismatch
|
||||
// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
|
||||
// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
|
||||
// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
// warning C4804: '<' : unsafe use of type 'bool' in operation
|
||||
// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation
|
||||
// cannot find another implementation -> declared as system header to suppress these warnings.
|
||||
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
|
||||
# pragma GCC system_header
|
||||
#elif BOOST_MSVC
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 )
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
// This namespace ensures that argument-dependent name lookup does not mess things up.
|
||||
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
|
||||
|
||||
// 1. a function to have an instance of type T without requiring T to be default
|
||||
// constructible
|
||||
template <typename T> T &make();
|
||||
|
||||
|
||||
// 2. checks if the operator returns void or not
|
||||
// conditions: Lhs!=void and Rhs!=void
|
||||
|
||||
// we first redefine "operator," so that we have no compilation error if
|
||||
// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
|
||||
// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
|
||||
// operator BOOST_TT_TRAIT_OP returns void or not:
|
||||
// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
|
||||
// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
|
||||
struct returns_void_t { };
|
||||
template <typename T> int operator,(const T&, returns_void_t);
|
||||
template <typename T> int operator,(const volatile T&, returns_void_t);
|
||||
|
||||
// this intermediate trait has member value of type bool:
|
||||
// - value==true -> operator BOOST_TT_TRAIT_OP returns void
|
||||
// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_returns_void {
|
||||
// overloads of function returns_void make the difference
|
||||
// yes_type and no_type have different size by construction
|
||||
static ::boost::type_traits::yes_type returns_void(returns_void_t);
|
||||
static ::boost::type_traits::no_type returns_void(int);
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
|
||||
};
|
||||
|
||||
|
||||
// 3. checks if the return type is Ret or Ret==dont_care
|
||||
// conditions: Lhs!=void and Rhs!=void
|
||||
|
||||
struct dont_care { };
|
||||
|
||||
template < typename Lhs, typename Rhs, typename Ret, bool Returns_void >
|
||||
struct operator_returns_Ret;
|
||||
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_returns_Ret < Lhs, Rhs, void, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_returns_Ret < Lhs, Rhs, void, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Rhs, typename Ret >
|
||||
struct operator_returns_Ret < Lhs, Rhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// otherwise checks if it is convertible to Ret using the sizeof trick
|
||||
// based on overload resolution
|
||||
// condition: Ret!=void and Ret!=dont_care and the operator does not return void
|
||||
template < typename Lhs, typename Rhs, typename Ret >
|
||||
struct operator_returns_Ret < Lhs, Rhs, Ret, false > {
|
||||
static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
|
||||
static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 4. we provide our operator definition for types that do not have one already
|
||||
|
||||
// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
|
||||
// found in the type's own namespace (our own operator is used) so that we have
|
||||
// a means to know that our operator was used
|
||||
struct no_operator { };
|
||||
|
||||
// this class allows implicit conversions and makes the following operator
|
||||
// definition less-preferred than any other such operators that might be found
|
||||
// via argument-dependent name lookup
|
||||
struct any { template <class T> any(T const&); };
|
||||
|
||||
// when operator BOOST_TT_TRAIT_OP is not available, this one is used
|
||||
no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
|
||||
|
||||
|
||||
// 5. checks for operator existence
|
||||
// condition: Lhs!=void and Rhs!=void
|
||||
|
||||
// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
|
||||
// existing one;
|
||||
// this is done with redefinition of "operator," that returns no_operator or has_operator
|
||||
struct has_operator { };
|
||||
no_operator operator,(no_operator, has_operator);
|
||||
|
||||
template < typename Lhs, typename Rhs >
|
||||
struct operator_exists {
|
||||
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
|
||||
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 5. main trait: to avoid any compilation error, this class behaves
|
||||
// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
|
||||
// standard.
|
||||
// Forbidden_if is a bool that is:
|
||||
// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
|
||||
// (would yield compilation error if used)
|
||||
// - false otherwise
|
||||
template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
|
||||
struct trait_impl1;
|
||||
|
||||
template < typename Lhs, typename Rhs, typename Ret >
|
||||
struct trait_impl1 < Lhs, Rhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Rhs, typename Ret >
|
||||
struct trait_impl1 < Lhs, Rhs, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value = (
|
||||
::boost::type_traits::ice_and<
|
||||
operator_exists < Lhs, Rhs >::value,
|
||||
operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value
|
||||
>::value
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
// some specializations needs to be declared for the special void case
|
||||
template < typename Rhs, typename Ret >
|
||||
struct trait_impl1 < void, Rhs, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Ret >
|
||||
struct trait_impl1 < Lhs, void, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Ret >
|
||||
struct trait_impl1 < void, void, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// defines some typedef for convenience
|
||||
template < typename Lhs, typename Rhs, typename Ret >
|
||||
struct trait_impl {
|
||||
typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
|
||||
typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
|
||||
typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
|
||||
typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
|
||||
typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
|
||||
typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
|
||||
BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
|
||||
};
|
||||
|
||||
} // namespace impl
|
||||
} // namespace detail
|
||||
|
||||
// this is the accessible definition of the trait to end user
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
@@ -0,0 +1,191 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/ice.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
// should be the last #include
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
// This namespace ensures that argument-dependent name lookup does not mess things up.
|
||||
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
|
||||
|
||||
// 1. a function to have an instance of type T without requiring T to be default
|
||||
// constructible
|
||||
template <typename T> T &make();
|
||||
|
||||
|
||||
// 2. checks if the operator returns void or not
|
||||
// conditions: Lhs!=void
|
||||
|
||||
// we first redefine "operator," so that we have no compilation error if
|
||||
// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
|
||||
// (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if
|
||||
// operator BOOST_TT_TRAIT_OP returns void or not:
|
||||
// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t
|
||||
// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int
|
||||
struct returns_void_t { };
|
||||
template <typename T> int operator,(const T&, returns_void_t);
|
||||
template <typename T> int operator,(const volatile T&, returns_void_t);
|
||||
|
||||
// this intermediate trait has member value of type bool:
|
||||
// - value==true -> operator BOOST_TT_TRAIT_OP returns void
|
||||
// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
|
||||
template < typename Lhs >
|
||||
struct operator_returns_void {
|
||||
// overloads of function returns_void make the difference
|
||||
// yes_type and no_type have different size by construction
|
||||
static ::boost::type_traits::yes_type returns_void(returns_void_t);
|
||||
static ::boost::type_traits::no_type returns_void(int);
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP,returns_void_t())))));
|
||||
//BOOST_STATIC_CONSTANT(bool, value = (::boost::is_same< bool volatile, Lhs >::value));
|
||||
};
|
||||
|
||||
|
||||
// 3. checks if the return type is Ret or Ret==dont_care
|
||||
// conditions: Lhs!=void
|
||||
|
||||
struct dont_care { };
|
||||
|
||||
template < typename Lhs, typename Ret, bool Returns_void >
|
||||
struct operator_returns_Ret;
|
||||
|
||||
template < typename Lhs >
|
||||
struct operator_returns_Ret < Lhs, dont_care, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs >
|
||||
struct operator_returns_Ret < Lhs, dont_care, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs >
|
||||
struct operator_returns_Ret < Lhs, void, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Lhs >
|
||||
struct operator_returns_Ret < Lhs, void, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Ret >
|
||||
struct operator_returns_Ret < Lhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// otherwise checks if it is convertible to Ret using the sizeof trick
|
||||
// based on overload resolution
|
||||
// condition: Ret!=void and Ret!=dont_care and the operator does not return void
|
||||
template < typename Lhs, typename Ret >
|
||||
struct operator_returns_Ret < Lhs, Ret, false > {
|
||||
static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
|
||||
static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 4. we provide our operator definition for types that do not have one already
|
||||
|
||||
// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
|
||||
// found in the type's own namespace (our own operator is used) so that we have
|
||||
// a means to know that our operator was used
|
||||
struct no_operator { };
|
||||
|
||||
// this class allows implicit conversions and makes the following operator
|
||||
// definition less-preferred than any other such operators that might be found
|
||||
// via argument-dependent name lookup
|
||||
struct any { template <class T> any(T const&); };
|
||||
|
||||
// when operator BOOST_TT_TRAIT_OP is not available, this one is used
|
||||
no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
|
||||
|
||||
|
||||
// 5. checks for operator existence
|
||||
// condition: Lhs!=void
|
||||
|
||||
// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
|
||||
// existing one;
|
||||
// this is done with redefinition of "operator," that returns no_operator or has_operator
|
||||
struct has_operator { };
|
||||
no_operator operator,(no_operator, has_operator);
|
||||
|
||||
template < typename Lhs >
|
||||
struct operator_exists {
|
||||
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
|
||||
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 5. main trait: to avoid any compilation error, this class behaves
|
||||
// differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the
|
||||
// standard.
|
||||
// Forbidden_if is a bool that is:
|
||||
// - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard
|
||||
// (would yield compilation error if used)
|
||||
// - false otherwise
|
||||
template < typename Lhs, typename Ret, bool Forbidden_if >
|
||||
struct trait_impl1;
|
||||
|
||||
template < typename Lhs, typename Ret >
|
||||
struct trait_impl1 < Lhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Lhs, typename Ret >
|
||||
struct trait_impl1 < Lhs, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value = (
|
||||
::boost::type_traits::ice_and<
|
||||
operator_exists < Lhs >::value,
|
||||
operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value
|
||||
>::value
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
// specialization needs to be declared for the special void case
|
||||
template < typename Ret >
|
||||
struct trait_impl1 < void, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// defines some typedef for convenience
|
||||
template < typename Lhs, typename Ret >
|
||||
struct trait_impl {
|
||||
typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
|
||||
typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
|
||||
typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
|
||||
BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
|
||||
};
|
||||
|
||||
} // namespace impl
|
||||
} // namespace detail
|
||||
|
||||
// this is the accessible definition of the trait to end user
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl< Lhs, Ret >::value))
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
@@ -0,0 +1,210 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/ice.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
// should be the last #include
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
// cannot include this header without getting warnings of the kind:
|
||||
// gcc:
|
||||
// warning: value computed is not used
|
||||
// warning: comparison between signed and unsigned integer expressions
|
||||
// msvc:
|
||||
// warning C4146: unary minus operator applied to unsigned type, result still unsigned
|
||||
// warning C4804: '-' : unsafe use of type 'bool' in operation
|
||||
// cannot find another implementation -> declared as system header to suppress these warnings.
|
||||
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
|
||||
# pragma GCC system_header
|
||||
#elif BOOST_MSVC
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4146 4804 )
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
// This namespace ensures that argument-dependent name lookup does not mess things up.
|
||||
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
|
||||
|
||||
// 1. a function to have an instance of type T without requiring T to be default
|
||||
// constructible
|
||||
template <typename T> T &make();
|
||||
|
||||
|
||||
// 2. checks if the operator returns void or not
|
||||
// conditions: Rhs!=void
|
||||
|
||||
// we first redefine "operator," so that we have no compilation error if
|
||||
// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
|
||||
// (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
|
||||
// operator BOOST_TT_TRAIT_OP returns void or not:
|
||||
// - operator BOOST_TT_TRAIT_OP returns void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
|
||||
// - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
|
||||
struct returns_void_t { };
|
||||
template <typename T> int operator,(const T&, returns_void_t);
|
||||
template <typename T> int operator,(const volatile T&, returns_void_t);
|
||||
|
||||
// this intermediate trait has member value of type bool:
|
||||
// - value==true -> operator BOOST_TT_TRAIT_OP returns void
|
||||
// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
|
||||
template < typename Rhs >
|
||||
struct operator_returns_void {
|
||||
// overloads of function returns_void make the difference
|
||||
// yes_type and no_type have different size by construction
|
||||
static ::boost::type_traits::yes_type returns_void(returns_void_t);
|
||||
static ::boost::type_traits::no_type returns_void(int);
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
|
||||
};
|
||||
|
||||
|
||||
// 3. checks if the return type is Ret or Ret==dont_care
|
||||
// conditions: Rhs!=void
|
||||
|
||||
struct dont_care { };
|
||||
|
||||
template < typename Rhs, typename Ret, bool Returns_void >
|
||||
struct operator_returns_Ret;
|
||||
|
||||
template < typename Rhs >
|
||||
struct operator_returns_Ret < Rhs, dont_care, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Rhs >
|
||||
struct operator_returns_Ret < Rhs, dont_care, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Rhs >
|
||||
struct operator_returns_Ret < Rhs, void, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template < typename Rhs >
|
||||
struct operator_returns_Ret < Rhs, void, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Rhs, typename Ret >
|
||||
struct operator_returns_Ret < Rhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// otherwise checks if it is convertible to Ret using the sizeof trick
|
||||
// based on overload resolution
|
||||
// condition: Ret!=void and Ret!=dont_care and the operator does not return void
|
||||
template < typename Rhs, typename Ret >
|
||||
struct operator_returns_Ret < Rhs, Ret, false > {
|
||||
static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
|
||||
static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 4. we provide our operator definition for types that do not have one already
|
||||
|
||||
// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
|
||||
// found in the type's own namespace (our own operator is used) so that we have
|
||||
// a means to know that our operator was used
|
||||
struct no_operator { };
|
||||
|
||||
// this class allows implicit conversions and makes the following operator
|
||||
// definition less-preferred than any other such operators that might be found
|
||||
// via argument-dependent name lookup
|
||||
struct any { template <class T> any(T const&); };
|
||||
|
||||
// when operator BOOST_TT_TRAIT_OP is not available, this one is used
|
||||
no_operator operator BOOST_TT_TRAIT_OP (const any&);
|
||||
|
||||
|
||||
// 5. checks for operator existence
|
||||
// condition: Rhs!=void
|
||||
|
||||
// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
|
||||
// existing one;
|
||||
// this is done with redefinition of "operator," that returns no_operator or has_operator
|
||||
struct has_operator { };
|
||||
no_operator operator,(no_operator, has_operator);
|
||||
|
||||
template < typename Rhs >
|
||||
struct operator_exists {
|
||||
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
|
||||
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
|
||||
};
|
||||
|
||||
|
||||
// 5. main trait: to avoid any compilation error, this class behaves
|
||||
// differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the
|
||||
// standard.
|
||||
// Forbidden_if is a bool that is:
|
||||
// - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard
|
||||
// (would yield compilation error if used)
|
||||
// - false otherwise
|
||||
template < typename Rhs, typename Ret, bool Forbidden_if >
|
||||
struct trait_impl1;
|
||||
|
||||
template < typename Rhs, typename Ret >
|
||||
struct trait_impl1 < Rhs, Ret, true > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template < typename Rhs, typename Ret >
|
||||
struct trait_impl1 < Rhs, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value = (
|
||||
::boost::type_traits::ice_and<
|
||||
operator_exists < Rhs >::value,
|
||||
operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value
|
||||
>::value
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
// specialization needs to be declared for the special void case
|
||||
template < typename Ret >
|
||||
struct trait_impl1 < void, Ret, false > {
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// defines some typedef for convenience
|
||||
template < typename Rhs, typename Ret >
|
||||
struct trait_impl {
|
||||
typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
|
||||
typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
|
||||
typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
|
||||
BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
|
||||
};
|
||||
|
||||
} // namespace impl
|
||||
} // namespace detail
|
||||
|
||||
// this is the accessible definition of the trait to end user
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Rhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Rhs, Ret >::value))
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_AND_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_AND_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_and
|
||||
#define BOOST_TT_TRAIT_OP &
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_and_assign
|
||||
#define BOOST_TT_TRAIT_OP &=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_or
|
||||
#define BOOST_TT_TRAIT_OP |
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_or_assign
|
||||
#define BOOST_TT_TRAIT_OP |=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_xor
|
||||
#define BOOST_TT_TRAIT_OP ^
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_xor_assign
|
||||
#define BOOST_TT_TRAIT_OP ^=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_complement
|
||||
#define BOOST_TT_TRAIT_OP ~
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* pointer */\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
/* fundamental non integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_dereference
|
||||
#define BOOST_TT_TRAIT_OP *
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* void* or fundamental */\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_divides
|
||||
#define BOOST_TT_TRAIT_OP /
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer with pointer or fundamental */\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_divides_assign
|
||||
#define BOOST_TT_TRAIT_OP /=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Lhs==const and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_equal_to
|
||||
#define BOOST_TT_TRAIT_OP ==
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_GREATER_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_GREATER_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_greater
|
||||
#define BOOST_TT_TRAIT_OP >
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_greater_equal
|
||||
#define BOOST_TT_TRAIT_OP >=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_left_shift
|
||||
#define BOOST_TT_TRAIT_OP <<
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_left_shift_assign
|
||||
#define BOOST_TT_TRAIT_OP <<=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LESS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LESS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_less
|
||||
#define BOOST_TT_TRAIT_OP <
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_less_equal
|
||||
#define BOOST_TT_TRAIT_OP <=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_logical_and
|
||||
#define BOOST_TT_TRAIT_OP &&
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer with fundamental non convertible to bool */\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_logical_not
|
||||
#define BOOST_TT_TRAIT_OP !
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
false
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_logical_or
|
||||
#define BOOST_TT_TRAIT_OP ||
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer with fundamental non convertible to bool */\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MINUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MINUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_minus
|
||||
#define BOOST_TT_TRAIT_OP -
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value,\
|
||||
/* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs=fundamental and Rhs=pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* two different pointers */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, Rhs_nocv >::value >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_minus_assign
|
||||
#define BOOST_TT_TRAIT_OP -=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value,\
|
||||
/* Lhs==void* and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==void* and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs=fundamental and Rhs=pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MODULUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MODULUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_modulus
|
||||
#define BOOST_TT_TRAIT_OP %
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_modulus_assign
|
||||
#define BOOST_TT_TRAIT_OP %=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_multiplies
|
||||
#define BOOST_TT_TRAIT_OP *
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer with pointer or fundamental */\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_multiplies_assign
|
||||
#define BOOST_TT_TRAIT_OP *=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Lhs==const and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_NEGATE_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_NEGATE_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_negate
|
||||
#define BOOST_TT_TRAIT_OP -
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer */\
|
||||
::boost::is_pointer< Rhs_noref >::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_not_equal_to
|
||||
#define BOOST_TT_TRAIT_OP !=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::type_traits::ice_not<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
|
||||
::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/has_bit_and.hpp>
|
||||
#include <boost/type_traits/has_bit_and_assign.hpp>
|
||||
#include <boost/type_traits/has_bit_or.hpp>
|
||||
#include <boost/type_traits/has_bit_or_assign.hpp>
|
||||
#include <boost/type_traits/has_bit_xor.hpp>
|
||||
#include <boost/type_traits/has_bit_xor_assign.hpp>
|
||||
#include <boost/type_traits/has_complement.hpp>
|
||||
#include <boost/type_traits/has_dereference.hpp>
|
||||
#include <boost/type_traits/has_divides.hpp>
|
||||
#include <boost/type_traits/has_divides_assign.hpp>
|
||||
#include <boost/type_traits/has_equal_to.hpp>
|
||||
#include <boost/type_traits/has_greater.hpp>
|
||||
#include <boost/type_traits/has_greater_equal.hpp>
|
||||
#include <boost/type_traits/has_left_shift.hpp>
|
||||
#include <boost/type_traits/has_left_shift_assign.hpp>
|
||||
#include <boost/type_traits/has_less.hpp>
|
||||
#include <boost/type_traits/has_less_equal.hpp>
|
||||
#include <boost/type_traits/has_logical_and.hpp>
|
||||
#include <boost/type_traits/has_logical_not.hpp>
|
||||
#include <boost/type_traits/has_logical_or.hpp>
|
||||
#include <boost/type_traits/has_minus.hpp>
|
||||
#include <boost/type_traits/has_minus_assign.hpp>
|
||||
#include <boost/type_traits/has_modulus.hpp>
|
||||
#include <boost/type_traits/has_modulus_assign.hpp>
|
||||
#include <boost/type_traits/has_multiplies.hpp>
|
||||
#include <boost/type_traits/has_multiplies_assign.hpp>
|
||||
#include <boost/type_traits/has_negate.hpp>
|
||||
#include <boost/type_traits/has_not_equal_to.hpp>
|
||||
#include <boost/type_traits/has_plus.hpp>
|
||||
#include <boost/type_traits/has_plus_assign.hpp>
|
||||
#include <boost/type_traits/has_post_decrement.hpp>
|
||||
#include <boost/type_traits/has_post_increment.hpp>
|
||||
#include <boost/type_traits/has_pre_decrement.hpp>
|
||||
#include <boost/type_traits/has_pre_increment.hpp>
|
||||
#include <boost/type_traits/has_right_shift.hpp>
|
||||
#include <boost/type_traits/has_right_shift_assign.hpp>
|
||||
#include <boost/type_traits/has_unary_minus.hpp>
|
||||
#include <boost/type_traits/has_unary_plus.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PLUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_plus
|
||||
#define BOOST_TT_TRAIT_OP +
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==void* and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==void* and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_plus_assign
|
||||
#define BOOST_TT_TRAIT_OP +=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==void* and Rhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Rhs==void* and Lhs==fundamental */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value,\
|
||||
/* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, bool >::value >::value\
|
||||
>::value,\
|
||||
/* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_post_decrement
|
||||
#define BOOST_TT_TRAIT_OP --
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* bool */\
|
||||
::boost::is_same< bool, Lhs_nocv >::value,\
|
||||
/* void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value\
|
||||
>::value,\
|
||||
/* (fundamental or pointer) and const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_postfix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_post_increment
|
||||
#define BOOST_TT_TRAIT_OP ++
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_void< Lhs_noptr >::value\
|
||||
>::value,\
|
||||
/* (fundamental or pointer) and const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_postfix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_pre_decrement
|
||||
#define BOOST_TT_TRAIT_OP --
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* bool */\
|
||||
::boost::is_same< bool, Rhs_nocv >::value,\
|
||||
/* void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value,\
|
||||
/* (fundamental or pointer) and const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_pre_increment
|
||||
#define BOOST_TT_TRAIT_OP ++
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* void* */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Rhs_noref >::value,\
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
>::value,\
|
||||
/* (fundamental or pointer) and const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
::boost::is_const< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_right_shift
|
||||
#define BOOST_TT_TRAIT_OP >>
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_right_shift_assign
|
||||
#define BOOST_TT_TRAIT_OP >>=
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
::boost::type_traits::ice_or<\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::type_traits::ice_or<\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
|
||||
::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
|
||||
>::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_pointer< Lhs_noref >::value,\
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
>::value,\
|
||||
/* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
|
||||
::boost::type_traits::ice_and<\
|
||||
::boost::is_fundamental< Lhs_nocv >::value,\
|
||||
::boost::is_fundamental< Rhs_nocv >::value,\
|
||||
::boost::is_const< Lhs_noref >::value\
|
||||
>::value\
|
||||
>::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_unary_minus
|
||||
#define BOOST_TT_TRAIT_OP -
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
/* pointer */\
|
||||
::boost::is_pointer< Rhs_noref >::value
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_unary_plus
|
||||
#define BOOST_TT_TRAIT_OP +
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
false
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user