From 7e19a87e67a8eca792adc64ee3bd0e35e9cca2df Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 13 Mar 2018 18:03:18 +0000 Subject: [PATCH] Update tests for GCC-4.6.x failures. Also suppress one new msvc warning (from 14.1 update 6). --- include/boost/type_traits/detail/has_prefix_operator.hpp | 3 +++ include/boost/type_traits/is_list_constructible.hpp | 5 ++++- include/boost/type_traits/is_nothrow_swappable.hpp | 4 +++- test/has_nothrow_copy_test.cpp | 2 ++ test/is_constructible_test.cpp | 2 ++ test/is_nothrow_move_assignable_test.cpp | 4 ++-- test/is_nothrow_move_constructible_test.cpp | 2 ++ test/is_nothrow_swappable_test.cpp | 2 ++ test/tricky_rvalue_test.cpp | 2 ++ 9 files changed, 22 insertions(+), 4 deletions(-) diff --git a/include/boost/type_traits/detail/has_prefix_operator.hpp b/include/boost/type_traits/detail/has_prefix_operator.hpp index f6b8b86..a246c60 100644 --- a/include/boost/type_traits/detail/has_prefix_operator.hpp +++ b/include/boost/type_traits/detail/has_prefix_operator.hpp @@ -35,6 +35,9 @@ # if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) # pragma warning ( disable : 6334) # endif +# if BOOST_WORKAROUND(_MSC_VER, >= 1913) +# pragma warning ( disable : 4834) +# endif #endif diff --git a/include/boost/type_traits/is_list_constructible.hpp b/include/boost/type_traits/is_list_constructible.hpp index a47fac1..4a9f84a 100644 --- a/include/boost/type_traits/is_list_constructible.hpp +++ b/include/boost/type_traits/is_list_constructible.hpp @@ -8,6 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #include #include #include @@ -16,7 +17,9 @@ namespace boost { -#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)\ + || BOOST_WORKAROUND(BOOST_GCC, < 40700) template struct is_list_constructible: false_type { diff --git a/include/boost/type_traits/is_nothrow_swappable.hpp b/include/boost/type_traits/is_nothrow_swappable.hpp index f55d268..10ad923 100644 --- a/include/boost/type_traits/is_nothrow_swappable.hpp +++ b/include/boost/type_traits/is_nothrow_swappable.hpp @@ -8,8 +8,10 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include -#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) || BOOST_WORKAROUND(BOOST_GCC, < 40700) #include #include diff --git a/test/has_nothrow_copy_test.cpp b/test/has_nothrow_copy_test.cpp index a06a70a..d9b8079 100644 --- a/test/has_nothrow_copy_test.cpp +++ b/test/has_nothrow_copy_test.cpp @@ -227,7 +227,9 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::val BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40700)) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); +#endif #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); diff --git a/test/is_constructible_test.cpp b/test/is_constructible_test.cpp index b607390..600a3bd 100644 --- a/test/is_constructible_test.cpp +++ b/test/is_constructible_test.cpp @@ -71,7 +71,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), true BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), true); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40700)) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), true); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible::value), false); diff --git a/test/is_nothrow_move_assignable_test.cpp b/test/is_nothrow_move_assignable_test.cpp index 32f8a57..6c54921 100644 --- a/test/is_nothrow_move_assignable_test.cpp +++ b/test/is_nothrow_move_assignable_test.cpp @@ -9,7 +9,7 @@ #include "test.hpp" #include "check_integral_constant.hpp" -#if !(defined(BOOST_MSVC) && defined(BOOST_TT_DISABLE_INTRINSICS) && defined(CI_SUPPRESS_KNOWN_ISSUES)) +#if !((defined(BOOST_MSVC) || BOOST_WORKAROUND(BOOST_GCC, < 40700)) && defined(BOOST_TT_DISABLE_INTRINSICS) && defined(CI_SUPPRESS_KNOWN_ISSUES)) #ifdef TEST_STD # include @@ -250,7 +250,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); #endif -#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); #endif diff --git a/test/is_nothrow_move_constructible_test.cpp b/test/is_nothrow_move_constructible_test.cpp index 5bfbdfe..5f5d5b8 100644 --- a/test/is_nothrow_move_constructible_test.cpp +++ b/test/is_nothrow_move_constructible_test.cpp @@ -248,7 +248,9 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40700) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); +#endif #if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); diff --git a/test/is_nothrow_swappable_test.cpp b/test/is_nothrow_swappable_test.cpp index 009f9b2..a230896 100644 --- a/test/is_nothrow_swappable_test.cpp +++ b/test/is_nothrow_swappable_test.cpp @@ -53,6 +53,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, t BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, false); #if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \ + || BOOST_WORKAROUND(BOOST_GCC, < 40700)\ || (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, false); @@ -71,6 +72,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, false); #if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \ + || BOOST_WORKAROUND(BOOST_GCC, < 40700)\ || (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable::value, false); diff --git a/test/tricky_rvalue_test.cpp b/test/tricky_rvalue_test.cpp index dce57b2..8199edc 100644 --- a/test/tricky_rvalue_test.cpp +++ b/test/tricky_rvalue_test.cpp @@ -25,9 +25,11 @@ TT_TEST_BEGIN(rvalue_reference_test) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40700)) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); #endif +#endif #endif