forked from boostorg/type_traits
Make the unary operator traits use "perfect" detection.
Update tests accordingly.
This commit is contained in:
@ -7,6 +7,59 @@
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace binary_op_detail {
|
||||
|
||||
struct dont_care;
|
||||
|
||||
template <class T, class Ret, class = boost::void_t<>>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
|
||||
|
||||
template <class T, class Ret>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP) > >
|
||||
: public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP), Ret>::value> {};
|
||||
|
||||
template <class T, class = boost::void_t<> >
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
|
||||
|
||||
template <class T>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, boost::void_t<decltype(std::declval<typename add_reference<T>::type>()BOOST_TT_TRAIT_OP)> >
|
||||
: public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP)>::value> {};
|
||||
|
||||
template <class T, class = boost::void_t<>>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
|
||||
|
||||
template <class T>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP)> >
|
||||
: public boost::true_type {};
|
||||
|
||||
}
|
||||
|
||||
template <class T, class Ret = boost::binary_op_detail::dont_care>
|
||||
struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) <T, Ret> {};
|
||||
template <class T>
|
||||
struct BOOST_TT_TRAIT_NAME<T, void> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T> {};
|
||||
template <class T>
|
||||
struct BOOST_TT_TRAIT_NAME<T, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T> {};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
@ -193,3 +246,5 @@ struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BO
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,75 @@
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <utility>
|
||||
|
||||
#ifdef BOOST_GCC
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated"
|
||||
#endif
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4804)
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace binary_op_detail {
|
||||
|
||||
struct dont_care;
|
||||
|
||||
template <class T, class Ret, class = boost::void_t<>>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
|
||||
|
||||
template <class T, class Ret>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, Ret, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>()) > >
|
||||
: public boost::integral_constant<bool, ::boost::is_convertible<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>() ), Ret>::value> {};
|
||||
|
||||
template <class T, class = boost::void_t<> >
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
|
||||
|
||||
template <class T>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>())> >
|
||||
: public boost::integral_constant<bool, ::boost::is_void<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>())>::value> {};
|
||||
|
||||
template <class T, class = boost::void_t<>>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
|
||||
|
||||
template <class T>
|
||||
struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>() )> >
|
||||
: public boost::true_type {};
|
||||
|
||||
}
|
||||
|
||||
template <class T, class Ret = boost::binary_op_detail::dont_care>
|
||||
struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) <T, Ret> {};
|
||||
template <class T>
|
||||
struct BOOST_TT_TRAIT_NAME<T, void> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T> {};
|
||||
template <class T>
|
||||
struct BOOST_TT_TRAIT_NAME<T, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T> {};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef BOOST_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
@ -206,3 +275,6 @@ struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BO
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -27,5 +27,349 @@
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const volatile, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile, void> : public false_type {};
|
||||
|
||||
// references:
|
||||
template <class R>
|
||||
struct has_dereference<void*&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const volatile&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile&, void> : public false_type {};
|
||||
|
||||
// rvalue refs:
|
||||
template <class R>
|
||||
struct has_dereference<void*&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<void*const volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<void*const volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const void*const volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const void*const volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<volatile void*const volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<volatile void*const volatile&&, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_dereference<const volatile void*const volatile&&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_dereference<const volatile void*const volatile&&, void> : public false_type {};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -41,4 +41,25 @@
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class R>
|
||||
struct has_post_decrement<bool, R> : public false_type {};
|
||||
template <>
|
||||
struct has_post_decrement<bool, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_post_decrement<bool, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_post_decrement<bool&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_post_decrement<bool&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_post_decrement<bool&, void> : public false_type {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -41,4 +41,25 @@
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class R>
|
||||
struct has_post_increment<bool, R> : public false_type {};
|
||||
template <>
|
||||
struct has_post_increment<bool, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_post_increment<bool, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_post_increment<bool&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_post_increment<bool&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_post_increment<bool&, void> : public false_type {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -41,4 +41,25 @@
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class R>
|
||||
struct has_pre_decrement<bool, R> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_decrement<bool, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_decrement<bool, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_pre_decrement<bool&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_decrement<bool&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_decrement<bool&, void> : public false_type {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -41,4 +41,26 @@
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class R>
|
||||
struct has_pre_increment<bool, R> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_increment<bool, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_increment<bool, void> : public false_type {};
|
||||
|
||||
template <class R>
|
||||
struct has_pre_increment<bool&, R> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_increment<bool&, boost::binary_op_detail::dont_care> : public false_type {};
|
||||
template <>
|
||||
struct has_pre_increment<bool&, void> : public false_type {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -96,6 +96,7 @@ template <class T> struct is_function : integral_constant<bool, ::boost::detail:
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T> struct is_function<T&&> : public false_type {};
|
||||
#endif
|
||||
template <class T> struct is_function<T&> : public false_type {};
|
||||
#endif
|
||||
} // namespace boost
|
||||
|
||||
|
@ -219,6 +219,23 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,23 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,23 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,23 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,8 +219,22 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -219,8 +219,22 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user