forked from boostorg/type_traits
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:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user