forked from boostorg/type_traits
Comparison operators: add poor man's workaround for captureless lambdas
This commit is contained in:
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,9 @@
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
)\
|
||||
)\
|
||||
) || \
|
||||
(\
|
||||
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
@ -219,7 +219,7 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
@ -227,6 +227,10 @@ void specific() {
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -219,6 +219,19 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,19 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,19 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,19 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,19 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1);
|
||||
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
Reference in New Issue
Block a user