From 2d04c70520b08ac27208ce2788cae192b90f7c91 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 7 Jul 2015 18:35:52 +0100 Subject: [PATCH] Tentative fix for VC14. Intrinsics behaviour seems to have changed compared to VC12. --- include/boost/type_traits/has_nothrow_assign.hpp | 5 +++++ include/boost/type_traits/has_nothrow_constructor.hpp | 9 +++++++++ include/boost/type_traits/has_nothrow_copy.hpp | 5 +++++ include/boost/type_traits/has_trivial_assign.hpp | 5 +++++ include/boost/type_traits/has_trivial_copy.hpp | 3 +++ 5 files changed, 27 insertions(+) diff --git a/include/boost/type_traits/has_nothrow_assign.hpp b/include/boost/type_traits/has_nothrow_assign.hpp index 6af665f..764844f 100644 --- a/include/boost/type_traits/has_nothrow_assign.hpp +++ b/include/boost/type_traits/has_nothrow_assign.hpp @@ -67,6 +67,11 @@ namespace boost { template struct has_nothrow_assign : public has_nothrow_assign {}; template <> struct has_nothrow_assign : public false_type{}; +template struct has_nothrow_assign : public false_type{}; +template struct has_nothrow_assign : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_nothrow_assign : public false_type{}; +#endif #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct has_nothrow_assign : public false_type{}; template <> struct has_nothrow_assign : public false_type{}; diff --git a/include/boost/type_traits/has_nothrow_constructor.hpp b/include/boost/type_traits/has_nothrow_constructor.hpp index 562283b..c57ad8c 100644 --- a/include/boost/type_traits/has_nothrow_constructor.hpp +++ b/include/boost/type_traits/has_nothrow_constructor.hpp @@ -30,6 +30,11 @@ template struct has_nothrow_constructor : public integral_constant #include +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4197) // top-level volatile in cast is ignored +#endif + namespace boost { namespace detail{ template struct has_nothrow_constructor_imp : public boost::integral_constant{}; @@ -39,6 +44,10 @@ namespace boost { namespace detail{ template struct has_nothrow_constructor : public detail::has_nothrow_constructor_imp::value>{}; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + #else #include diff --git a/include/boost/type_traits/has_nothrow_copy.hpp b/include/boost/type_traits/has_nothrow_copy.hpp index de7499a..b95e094 100644 --- a/include/boost/type_traits/has_nothrow_copy.hpp +++ b/include/boost/type_traits/has_nothrow_copy.hpp @@ -49,7 +49,9 @@ struct has_nothrow_copy_constructor_imp : public boost::integral_consta template struct has_nothrow_copy_constructor : public detail::has_nothrow_copy_constructor_imp::value>{}; template struct has_nothrow_copy_constructor : public integral_constant{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template struct has_nothrow_copy_constructor : public integral_constant{}; +#endif template struct has_nothrow_copy_constructor : public integral_constant{}; #else @@ -63,6 +65,9 @@ template struct has_nothrow_copy_constructor : public integral_constan #endif template <> struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct has_nothrow_copy_constructor : public false_type{}; template <> struct has_nothrow_copy_constructor : public false_type{}; diff --git a/include/boost/type_traits/has_trivial_assign.hpp b/include/boost/type_traits/has_trivial_assign.hpp index 5217c78..a5e625d 100644 --- a/include/boost/type_traits/has_trivial_assign.hpp +++ b/include/boost/type_traits/has_trivial_assign.hpp @@ -36,6 +36,11 @@ namespace boost { template<> struct has_trivial_assign : public false_type{}; template<> struct has_trivial_assign : public false_type{}; template<> struct has_trivial_assign : public false_type{}; +#endif + template struct has_trivial_assign : public false_type{}; + template struct has_trivial_assign : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template struct has_trivial_assign : public false_type{}; #endif // Arrays are not explictly assignable: template struct has_trivial_assign : public false_type{}; diff --git a/include/boost/type_traits/has_trivial_copy.hpp b/include/boost/type_traits/has_trivial_copy.hpp index ef9c290..fc81dbe 100644 --- a/include/boost/type_traits/has_trivial_copy.hpp +++ b/include/boost/type_traits/has_trivial_copy.hpp @@ -43,6 +43,9 @@ template <> struct has_trivial_copy : public false_type{}; template <> struct has_trivial_copy : public false_type{}; #endif +template struct has_trivial_copy : public false_type{}; +template struct has_trivial_copy : public false_type{}; + template struct has_trivial_copy_constructor : public has_trivial_copy{}; #undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX