From 6b92cc7e2617582accee4546fab539282d3b92bf Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 22 Sep 2014 18:09:12 +0100 Subject: [PATCH 1/2] Fix C++11 syntax error --- test/is_convertible_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index 6f085ff..40764c0 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -30,7 +30,7 @@ template struct test_bug_4530 { template - test_bug_4530(A&&, typename boost::enable_if<::tt::is_convertible >::type* =0); + test_bug_4530(A&&, typename boost::enable_if< ::tt::is_convertible >::type* =0); }; struct A4530 From c845f41f2d9b185f424c496ee753633fee712dc4 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Wed, 24 Sep 2014 14:32:04 +0200 Subject: [PATCH 2/2] Compile fix for MSVC14 MSVC14 supports noexcept, but doesn't support expression SFINAE, so false_or_cpp11_noexcept_move_assignable fails to compile with error C3892: 'boost::declval': you cannot assign to a variable that is const Disabling the overload for const types so that they are never reported as noexcept move assignable fixes the compile error. Of course this doesn't work for imaginary UDTs with an assignment operator that is marked both noexcept and const - the alternative would be to guard the block with BOOST_NO_SFINAE_EXPR in addition to BOOST_NO_CXX11_NOEXCEPT. --- include/boost/type_traits/is_nothrow_move_assignable.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_nothrow_move_assignable.hpp b/include/boost/type_traits/is_nothrow_move_assignable.hpp index 5a3427f..c55dfc6 100644 --- a/include/boost/type_traits/is_nothrow_move_assignable.hpp +++ b/include/boost/type_traits/is_nothrow_move_assignable.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,7 @@ struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; template struct false_or_cpp11_noexcept_move_assignable < T, - typename ::boost::enable_if_c() = ::boost::declval())>::type + typename ::boost::enable_if_c::value && BOOST_NOEXCEPT_EXPR(::boost::declval() = ::boost::declval())>::type > : public ::boost::integral_constant() = ::boost::declval())> {};