diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index ebb1dd6..f8f3a99 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -13,7 +13,7 @@ #include #endif #include -#include +#include // // whenever we have a conversion function with ellipses @@ -67,6 +67,13 @@ #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) #define BOOST_TT_BROKEN_COMPILER_SPEC(x) +// +// Can we implement "accurate" binary operator detection: +// +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900) +# define BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION +#endif + #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/has_binary_operator.hpp b/include/boost/type_traits/detail/has_binary_operator.hpp index 0a21144..8fb552b 100644 --- a/include/boost/type_traits/detail/has_binary_operator.hpp +++ b/include/boost/type_traits/detail/has_binary_operator.hpp @@ -7,7 +7,7 @@ // See http://www.boost.org/libs/type_traits for most recent version including documentation. #include -#include +#include // cannot include this header without getting warnings of the kind: // gcc: @@ -31,7 +31,7 @@ # endif #endif -#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) #include #include diff --git a/include/boost/type_traits/has_minus.hpp b/include/boost/type_traits/has_minus.hpp index 912749c..ba47253 100644 --- a/include/boost/type_traits/has_minus.hpp +++ b/include/boost/type_traits/has_minus.hpp @@ -10,7 +10,7 @@ #define BOOST_TT_HAS_MINUS_HPP_INCLUDED #include -#include +#include // cannot include this header without getting warnings of the kind: // gcc: @@ -34,7 +34,7 @@ # endif #endif -#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) #include #include diff --git a/include/boost/type_traits/has_minus_assign.hpp b/include/boost/type_traits/has_minus_assign.hpp index 0ae6720..4f3d84f 100644 --- a/include/boost/type_traits/has_minus_assign.hpp +++ b/include/boost/type_traits/has_minus_assign.hpp @@ -10,7 +10,7 @@ #define BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED #include -#include +#include // cannot include this header without getting warnings of the kind: // gcc: @@ -34,7 +34,7 @@ # endif #endif -#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) #include #include diff --git a/include/boost/type_traits/has_plus_assign.hpp b/include/boost/type_traits/has_plus_assign.hpp index faeb220..b4d05ad 100644 --- a/include/boost/type_traits/has_plus_assign.hpp +++ b/include/boost/type_traits/has_plus_assign.hpp @@ -10,7 +10,7 @@ #define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED #include -#include +#include // cannot include this header without getting warnings of the kind: // gcc: @@ -34,7 +34,7 @@ # endif #endif -#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) #include #include diff --git a/test/has_binary_operators.hpp b/test/has_binary_operators.hpp index 3df8a82..d4cac69 100644 --- a/test/has_binary_operators.hpp +++ b/test/has_binary_operators.hpp @@ -152,7 +152,7 @@ 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) && !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: #if !BOOST_WORKAROUND(BOOST_MSVC, < 1910) TEST_TR(private_op, bool, false);