diff --git a/include/boost/type_traits/has_equal_to.hpp b/include/boost/type_traits/has_equal_to.hpp index d80a55d..fc672d4 100644 --- a/include/boost/type_traits/has_equal_to.hpp +++ b/include/boost/type_traits/has_equal_to.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/include/boost/type_traits/has_greater.hpp b/include/boost/type_traits/has_greater.hpp index 32e0a12..39be51e 100644 --- a/include/boost/type_traits/has_greater.hpp +++ b/include/boost/type_traits/has_greater.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/include/boost/type_traits/has_greater_equal.hpp b/include/boost/type_traits/has_greater_equal.hpp index a933a6b..09b42b9 100644 --- a/include/boost/type_traits/has_greater_equal.hpp +++ b/include/boost/type_traits/has_greater_equal.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/include/boost/type_traits/has_less.hpp b/include/boost/type_traits/has_less.hpp index 0eefcd2..2a33291 100644 --- a/include/boost/type_traits/has_less.hpp +++ b/include/boost/type_traits/has_less.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/include/boost/type_traits/has_less_equal.hpp b/include/boost/type_traits/has_less_equal.hpp index 4725bbd..4f38a1b 100644 --- a/include/boost/type_traits/has_less_equal.hpp +++ b/include/boost/type_traits/has_less_equal.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/include/boost/type_traits/has_not_equal_to.hpp b/include/boost/type_traits/has_not_equal_to.hpp index c2b6705..82060e7 100644 --- a/include/boost/type_traits/has_not_equal_to.hpp +++ b/include/boost/type_traits/has_not_equal_to.hpp @@ -36,6 +36,9 @@ ::boost::is_void< Rhs_noptr >::value\ )\ )\ + ) || \ + (\ + ::boost::is_class::value && ::boost::is_convertible::value\ )\ ) diff --git a/test/has_equal_to_test.cpp b/test/has_equal_to_test.cpp index 35a5dfd..62d54ee 100644 --- a/test/has_equal_to_test.cpp +++ b/test/has_equal_to_test.cpp @@ -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 } diff --git a/test/has_greater_equal_test.cpp b/test/has_greater_equal_test.cpp index 835daf1..c0c96fa 100644 --- a/test/has_greater_equal_test.cpp +++ b/test/has_greater_equal_test.cpp @@ -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) diff --git a/test/has_greater_test.cpp b/test/has_greater_test.cpp index bdaf46e..6576f39 100644 --- a/test/has_greater_test.cpp +++ b/test/has_greater_test.cpp @@ -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) diff --git a/test/has_less_equal_test.cpp b/test/has_less_equal_test.cpp index 2165787..7cf46b1 100644 --- a/test/has_less_equal_test.cpp +++ b/test/has_less_equal_test.cpp @@ -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) diff --git a/test/has_less_test.cpp b/test/has_less_test.cpp index 0be6b05..64065a0 100644 --- a/test/has_less_test.cpp +++ b/test/has_less_test.cpp @@ -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) diff --git a/test/has_not_equal_to_test.cpp b/test/has_not_equal_to_test.cpp index 7864c6f..ce6b880 100644 --- a/test/has_not_equal_to_test.cpp +++ b/test/has_not_equal_to_test.cpp @@ -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)