From e69dd6740a420473a73231d997cb621072e32230 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 8 Feb 2014 16:19:14 +0000 Subject: [PATCH] Fixes for msvc-13. --- include/boost/type_traits/intrinsics.hpp | 4 ++-- include/boost/type_traits/is_nothrow_move_assignable.hpp | 9 +++++++++ .../boost/type_traits/is_nothrow_move_constructible.hpp | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 799f9b6..4bcfd3c 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -109,8 +109,8 @@ // # define BOOST_ALIGNMENT_OF(T) __alignof(T) # if defined(_MSC_VER) && (_MSC_VER >= 1700) -# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::boost::is_pod::value) && !::boost::is_volatile::value) -# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::boost::is_pod::value) && !::boost::is_volatile::value && !::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && !::boost::is_reference::value) # endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS diff --git a/include/boost/type_traits/is_nothrow_move_assignable.hpp b/include/boost/type_traits/is_nothrow_move_assignable.hpp index 5a3427f..9188c6c 100644 --- a/include/boost/type_traits/is_nothrow_move_assignable.hpp +++ b/include/boost/type_traits/is_nothrow_move_assignable.hpp @@ -51,6 +51,15 @@ struct is_nothrow_move_assignable_imp{ >::value)); }; +#ifdef BOOST_NO_NOEXCEPT +// +// The above logic doesn't quite work in the absense of noexcept, +// this is really to improve things with VC13: +// +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +#endif + #else template diff --git a/include/boost/type_traits/is_nothrow_move_constructible.hpp b/include/boost/type_traits/is_nothrow_move_constructible.hpp index bc7fb88..c7218be 100644 --- a/include/boost/type_traits/is_nothrow_move_constructible.hpp +++ b/include/boost/type_traits/is_nothrow_move_constructible.hpp @@ -66,6 +66,15 @@ struct is_nothrow_move_constructible_imp{ #endif +#ifdef BOOST_NO_NOEXCEPT +// +// The above logic doesn't quite work in the absense of noexcept, +// this is really to improve things with VC13: +// +template +struct is_nothrow_move_constructible_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +#endif + } BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp::value)