mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 21:54:28 +02:00
Added new reset()-counterparts for the new ctors
[SVN r44777]
This commit is contained in:
@@ -390,6 +390,18 @@ public:
|
|||||||
this_type( r, p ).swap( *this );
|
this_type( r, p ).swap( *this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset( detail::shared_count const & c, T * p )
|
||||||
|
{
|
||||||
|
this_type( c, p ).swap( *this );
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined( BOOST_HAS_RVALUE_REFS )
|
||||||
|
void reset( detail::shared_count && c, T * p )
|
||||||
|
{
|
||||||
|
this_type( static_cast< detail::shared_count && >( c ), p ).swap( *this );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
reference operator* () const // never throws
|
reference operator* () const // never throws
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(px != 0);
|
BOOST_ASSERT(px != 0);
|
||||||
|
Reference in New Issue
Block a user