Switch to a centralised macro for binary operator traits implementation selection.

This commit is contained in:
jzmaddock
2018-02-10 17:40:39 +00:00
parent 7d42b545e9
commit 014ac72782
6 changed files with 17 additions and 10 deletions

View File

@ -13,7 +13,7 @@
#include <boost/config.hpp>
#endif
#include <boost/version.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config/workaround.hpp>
//
// 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

View File

@ -7,7 +7,7 @@
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/type_traits/detail/config.hpp>
// 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 <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/make_void.hpp>

View File

@ -10,7 +10,7 @@
#define BOOST_TT_HAS_MINUS_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/type_traits/detail/config.hpp>
// 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 <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/make_void.hpp>

View File

@ -10,7 +10,7 @@
#define BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/type_traits/detail/config.hpp>
// 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 <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/make_void.hpp>

View File

@ -10,7 +10,7 @@
#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/type_traits/detail/config.hpp>
// 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 <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/make_void.hpp>

View File

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