diff --git a/test/has_binary_operators.hpp b/test/has_binary_operators.hpp index 681cde9..165dad9 100644 --- a/test/has_binary_operators.hpp +++ b/test/has_binary_operators.hpp @@ -86,6 +86,14 @@ inline bool operator BOOST_TT_TRAIT_OP (const C&, void*) { return true; } inline bool operator BOOST_TT_TRAIT_OP (void*, const D&) { return true; } inline bool operator BOOST_TT_TRAIT_OP (const C&, const D&) { return true; } +struct private_op { private: void operator BOOST_TT_TRAIT_OP (const private_op&); }; + +struct ambiguous_A +{ +}; +bool operator BOOST_TT_TRAIT_OP (const ambiguous_A&, const ambiguous_A&); +struct ambiguous_B { operator ambiguous_A()const; }; + //class internal_private { ret operator BOOST_TT_TRAIT_OP (const internal_private&) const; }; void common() { @@ -144,6 +152,17 @@ void common() { TEST_TR(Derived2, bool, true); // compile time error // TEST_T(internal_private, false); +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) +// There are some things that pass that wouldn't otherwise do so: +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1910) + TEST_TR(private_op, bool, false); + TEST_T(private_op, false); +#endif + TEST_TR(ambiguous_A, bool, true); + TEST_T(ambiguous_A, true); + TEST_TR(ambiguous_B, bool, true); + TEST_T(ambiguous_B, true); +#endif } } diff --git a/test/has_equal_to_test.cpp b/test/has_equal_to_test.cpp index d987065..08ca61b 100644 --- a/test/has_equal_to_test.cpp +++ b/test/has_equal_to_test.cpp @@ -219,6 +219,15 @@ 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) + // 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 +#endif } TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)