Comparison operators: add poor man's workaround for captureless lambdas

This commit is contained in:
John Maddock
2018-02-12 18:30:08 +00:00
parent 0155b7030c
commit 28658d6c11
12 changed files with 88 additions and 1 deletions

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -36,6 +36,9 @@
::boost::is_void< Rhs_noptr >::value\
)\
)\
) || \
(\
::boost::is_class<Lhs_noref>::value && ::boost::is_convertible<Lhs_noref, void(*)()>::value\
)\
)

View File

@ -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
}

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)