From dea1f79512dc43e405cd2f0cd303c52510b61d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 18 Aug 2014 01:09:13 +0200 Subject: [PATCH] Fix for MSVC 12.0 std::is_copy_constructible and boost::is_copy_constructible return true for types with deleted copy constructors --- include/boost/type_traits/is_copy_constructible.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_copy_constructible.hpp b/include/boost/type_traits/is_copy_constructible.hpp index e90ecb7..24f5eeb 100644 --- a/include/boost/type_traits/is_copy_constructible.hpp +++ b/include/boost/type_traits/is_copy_constructible.hpp @@ -32,7 +32,10 @@ struct is_copy_constructible_impl2 { // error: function *function_name* cannot be referenced -- it is a deleted function // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); // ^ -#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800) #ifdef BOOST_NO_CXX11_DECLTYPE template