From 946221e5502802176755b72eb2b60738363163a0 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 9 Nov 2015 13:41:33 +0000 Subject: [PATCH] Fix has_nothrow_copy on Intel-16 / Windows. --- include/boost/type_traits/has_nothrow_copy.hpp | 4 ++++ include/boost/type_traits/intrinsics.hpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/include/boost/type_traits/has_nothrow_copy.hpp b/include/boost/type_traits/has_nothrow_copy.hpp index 8b92e43..0d9bb18 100644 --- a/include/boost/type_traits/has_nothrow_copy.hpp +++ b/include/boost/type_traits/has_nothrow_copy.hpp @@ -25,6 +25,10 @@ #elif defined(BOOST_MSVC) || defined(BOOST_INTEL) #include #include +#ifdef BOOST_INTEL +#include +#include +#endif #endif namespace boost { diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 14a3ee8..e87bba2 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -10,6 +10,8 @@ #ifndef BOOST_TT_DISABLE_INTRINSICS +#include + #ifndef BOOST_TT_CONFIG_HPP_INCLUDED #include #endif @@ -103,7 +105,11 @@ # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) +#if !defined(BOOST_INTEL) # define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) && !is_array::value) +#else if (_MSC_VER >= 1900) +# define BOOST_HAS_NOTHROW_COPY(T) ((__is_nothrow_constructible(T, typename add_lvalue_reference::type>::type)) && !is_array::value) +#endif # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)