From 0ef52c07fa10df2742874c447efb4e2b6e0d4afc Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 8 Mar 2013 15:52:46 +0000 Subject: [PATCH] Added C++11 specific tests for implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits (refs #8189). [SVN r83365] --- test/is_nothrow_move_assignable_test.cpp | 4 ++++ test/is_nothrow_move_constructible_test.cpp | 4 ++++ test/test.hpp | 12 ++++++++++++ 3 files changed, 20 insertions(+) diff --git a/test/is_nothrow_move_assignable_test.cpp b/test/is_nothrow_move_assignable_test.cpp index 5cb2b1c..2202701 100644 --- a/test/is_nothrow_move_assignable_test.cpp +++ b/test/is_nothrow_move_assignable_test.cpp @@ -204,6 +204,10 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); TT_TEST_END diff --git a/test/is_nothrow_move_constructible_test.cpp b/test/is_nothrow_move_constructible_test.cpp index 6bfc167..e17c3fd 100644 --- a/test/is_nothrow_move_constructible_test.cpp +++ b/test/is_nothrow_move_constructible_test.cpp @@ -200,6 +200,10 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, true); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); TT_TEST_END diff --git a/test/test.hpp b/test/test.hpp index 66809d5..4b826df 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -276,6 +276,18 @@ struct nothrow_assign_UDT { return true; } }; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +struct nothrow_move_UDT +{ + nothrow_move_UDT(); + nothrow_move_UDT(nothrow_move_UDT&&) throw(); + nothrow_move_UDT& operator=(nothrow_move_UDT&&) throw(); + bool operator==(const nothrow_move_UDT&)const + { return true; } +}; +#endif + + struct nothrow_construct_UDT { nothrow_construct_UDT()throw();