Added C++11 specific tests for implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits (refs #8189).

[SVN r83365]
This commit is contained in:
Antony Polukhin
2013-03-08 15:52:46 +00:00
parent 40d87a0683
commit 0ef52c07fa
3 changed files with 20 additions and 0 deletions

View File

@ -204,6 +204,10 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_assi
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_copy_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_construct_UDT>::value, false);
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_move_UDT>::value, true);
#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<test_abc1>::value, false);
TT_TEST_END

View File

@ -200,6 +200,10 @@ BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_c
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_assign_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_construct_UDT>::value, false);
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_move_UDT>::value, true);
#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<test_abc1>::value, false);
TT_TEST_END

View File

@ -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();