Tentative fix for VC14.

Intrinsics behaviour seems to have changed compared to VC12.
This commit is contained in:
jzmaddock
2015-07-07 18:35:52 +01:00
parent 50e7e269e5
commit 2d04c70520
5 changed files with 27 additions and 0 deletions

View File

@ -67,6 +67,11 @@ namespace boost {
template <class T, std::size_t N> struct has_nothrow_assign <T[N]> : public has_nothrow_assign<T> {};
template <> struct has_nothrow_assign<void> : public false_type{};
template <class T> struct has_nothrow_assign<T volatile> : public false_type{};
template <class T> struct has_nothrow_assign<T&> : public false_type{};
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <class T> struct has_nothrow_assign<T&&> : public false_type{};
#endif
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct has_nothrow_assign<void const> : public false_type{};
template <> struct has_nothrow_assign<void const volatile> : public false_type{};

View File

@ -30,6 +30,11 @@ template <class T> struct has_nothrow_constructor : public integral_constant<boo
#include <boost/type_traits/is_default_constructible.hpp>
#include <boost/type_traits/remove_all_extents.hpp>
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4197) // top-level volatile in cast is ignored
#endif
namespace boost { namespace detail{
template <class T, bool b> struct has_nothrow_constructor_imp : public boost::integral_constant<bool, false>{};
@ -39,6 +44,10 @@ namespace boost { namespace detail{
template <class T> struct has_nothrow_constructor : public detail::has_nothrow_constructor_imp<T, is_default_constructible<T>::value>{};
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#else
#include <boost/type_traits/has_trivial_constructor.hpp>

View File

@ -49,7 +49,9 @@ struct has_nothrow_copy_constructor_imp<T, true> : public boost::integral_consta
template <class T> struct has_nothrow_copy_constructor : public detail::has_nothrow_copy_constructor_imp<T, boost::is_copy_constructible<T>::value>{};
template <class T> struct has_nothrow_copy_constructor<T&> : public integral_constant<bool, false>{};
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <class T> struct has_nothrow_copy_constructor<T&&> : public integral_constant<bool, false>{};
#endif
template <class T> struct has_nothrow_copy_constructor<T volatile> : public integral_constant<bool, false>{};
#else
@ -63,6 +65,9 @@ template <class T> struct has_nothrow_copy_constructor : public integral_constan
#endif
template <> struct has_nothrow_copy_constructor<void> : public false_type{};
template <class T> struct has_nothrow_copy_constructor<T volatile> : public false_type{};
template <class T> struct has_nothrow_copy_constructor<T&> : public false_type{};
template <class T> struct has_nothrow_copy_constructor<T&&> : public false_type{};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct has_nothrow_copy_constructor<void const> : public false_type{};
template <> struct has_nothrow_copy_constructor<void volatile> : public false_type{};

View File

@ -36,6 +36,11 @@ namespace boost {
template<> struct has_trivial_assign<void const> : public false_type{};
template<> struct has_trivial_assign<void const volatile> : public false_type{};
template<> struct has_trivial_assign<void volatile> : public false_type{};
#endif
template <class T> struct has_trivial_assign<T volatile> : public false_type{};
template <class T> struct has_trivial_assign<T&> : public false_type{};
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <class T> struct has_trivial_assign<T&&> : public false_type{};
#endif
// Arrays are not explictly assignable:
template <typename T, std::size_t N> struct has_trivial_assign<T[N]> : public false_type{};

View File

@ -43,6 +43,9 @@ template <> struct has_trivial_copy<void volatile> : public false_type{};
template <> struct has_trivial_copy<void const volatile> : public false_type{};
#endif
template <class T> struct has_trivial_copy<T&> : public false_type{};
template <class T> struct has_trivial_copy<T&&> : public false_type{};
template <class T> struct has_trivial_copy_constructor : public has_trivial_copy<T>{};
#undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX