From dc272078fcfea5c0f40f988b951025dce3ee9acf Mon Sep 17 00:00:00 2001 From: scopeInfinity Date: Fri, 11 Dec 2015 20:01:01 +0530 Subject: [PATCH 1/4] [type_traits] Fixed is_complex with const types. Ticket #11840 --- include/boost/type_traits/is_complex.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/type_traits/is_complex.hpp b/include/boost/type_traits/is_complex.hpp index 08210eb..7cf04b4 100644 --- a/include/boost/type_traits/is_complex.hpp +++ b/include/boost/type_traits/is_complex.hpp @@ -14,6 +14,9 @@ namespace boost { template struct is_complex : public false_type {}; + template struct is_complex : public is_complex{}; + template struct is_complex : public is_complex{}; + template struct is_complex : public is_complex{}; template struct is_complex > : public true_type{}; } // namespace boost From 58d70ed28b98dbadfe017ce8e5f2e75b455ea382 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 11 Dec 2015 17:32:37 +0000 Subject: [PATCH 2/4] Add tests for https://svn.boost.org/trac/boost/ticket/11840. --- test/is_complex_test.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/is_complex_test.cpp b/test/is_complex_test.cpp index f47c641..2d0c2e8 100644 --- a/test/is_complex_test.cpp +++ b/test/is_complex_test.cpp @@ -32,6 +32,15 @@ TT_TEST_BEGIN(is_complex) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex >::value, true); TT_TEST_END From bc8a92c7b6ff76fa42d23f49f60d743f95d15798 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 12 Dec 2015 13:15:34 +0000 Subject: [PATCH 3/4] Suppress use of noexcept for gcc-4.6 as it doesn't handle all failure cases correctly. --- include/boost/type_traits/is_nothrow_move_constructible.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_nothrow_move_constructible.hpp b/include/boost/type_traits/is_nothrow_move_constructible.hpp index 3cbca21..ecacc82 100644 --- a/include/boost/type_traits/is_nothrow_move_constructible.hpp +++ b/include/boost/type_traits/is_nothrow_move_constructible.hpp @@ -25,7 +25,7 @@ struct is_nothrow_move_constructible : public integral_constant struct is_nothrow_move_constructible : public ::boost::false_type {}; template struct is_nothrow_move_constructible : public ::boost::false_type{}; -#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) #include #include From 08cb0bba322602372f983dfe964e2814feb296a2 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 12 Dec 2015 13:19:12 +0000 Subject: [PATCH 4/4] Add missing #include. --- include/boost/type_traits/is_nothrow_move_constructible.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/type_traits/is_nothrow_move_constructible.hpp b/include/boost/type_traits/is_nothrow_move_constructible.hpp index ecacc82..8f4cee2 100644 --- a/include/boost/type_traits/is_nothrow_move_constructible.hpp +++ b/include/boost/type_traits/is_nothrow_move_constructible.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT