diff --git a/include/boost/type_traits/is_copy_constructible.hpp b/include/boost/type_traits/is_copy_constructible.hpp index 756c2e7..032ad2b 100644 --- a/include/boost/type_traits/is_copy_constructible.hpp +++ b/include/boost/type_traits/is_copy_constructible.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -65,9 +66,11 @@ struct is_copy_constructible_impl2 { // T(const T &) = delete; // ... // }; - BOOST_STATIC_CONSTANT(bool, - value = (sizeof(test(boost::declval())) == sizeof(boost::type_traits::yes_type)) - ); + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test( + boost::declval::type>() + )) == sizeof(boost::type_traits::yes_type) + )); }; template @@ -81,7 +84,8 @@ struct is_copy_constructible_impl { BOOST_STATIC_CONSTANT(bool, value = ( boost::detail::is_copy_constructible_impl2< boost::is_base_and_derived::value, - T>::value + T + >::value )); }; diff --git a/test/is_copy_constructible_test.cpp b/test/is_copy_constructible_test.cpp index a54c399..7cca73a 100644 --- a/test/is_copy_constructible_test.cpp +++ b/test/is_copy_constructible_test.cpp @@ -259,7 +259,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible::value, true BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible::value, true); #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible::value, false); #endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible::value, true);