Update intrusive_ptr_move_test with converting move construction.

This commit is contained in:
Peter Dimov
2016-05-17 18:36:50 +03:00
parent a7ade6f062
commit b7f99ceba6

View File

@ -143,6 +143,18 @@ int main()
BOOST_TEST( N::base::instances == 0 );
}
{
boost::intrusive_ptr<Y> p( new Y );
BOOST_TEST( N::base::instances == 1 );
boost::intrusive_ptr<X> p2( std::move( p ) );
BOOST_TEST( N::base::instances == 1 );
BOOST_TEST( p.get() == 0 );
p2.reset();
BOOST_TEST( N::base::instances == 0 );
}
{
boost::intrusive_ptr<X> p( new X );
BOOST_TEST( N::base::instances == 1 );