From d44141cf888b718bb1d3f4e622f0ed1920fec95a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 11 Jun 2015 10:57:11 +0100 Subject: [PATCH] Fix behaviour of references and arrays in has_trivial_move_assign. --- include/boost/type_traits/has_trivial_move_assign.hpp | 7 +++++++ test/has_trivial_move_assign_test.cpp | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/boost/type_traits/has_trivial_move_assign.hpp b/include/boost/type_traits/has_trivial_move_assign.hpp index 94a358d..7fc7bf9 100644 --- a/include/boost/type_traits/has_trivial_move_assign.hpp +++ b/include/boost/type_traits/has_trivial_move_assign.hpp @@ -45,6 +45,13 @@ template <> struct has_trivial_move_assign : public false_type{}; template <> struct has_trivial_move_assign : public false_type{}; template <> struct has_trivial_move_assign : public false_type{}; #endif +template struct has_trivial_move_assign : public false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct has_trivial_move_assign : public false_type{}; +#endif +// Array types are not assignable: +template struct has_trivial_move_assign : public false_type{}; +template struct has_trivial_move_assign : public false_type{}; } // namespace boost diff --git a/test/has_trivial_move_assign_test.cpp b/test/has_trivial_move_assign_test.cpp index 009867f..7fe05e3 100644 --- a/test/has_trivial_move_assign_test.cpp +++ b/test/has_trivial_move_assign_test.cpp @@ -213,9 +213,10 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); #endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, true); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, true); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, true); +// array types are not assignable: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign::value, false);