forked from boostorg/smart_ptr
Merge [73202] to release.
[SVN r73542]
This commit is contained in:
@ -69,7 +69,25 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// generated copy constructor, assignment, destructor are fine
|
||||
// generated copy constructor, destructor are fine...
|
||||
|
||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
||||
|
||||
// ... except in C++0x, move disables the implicit copy
|
||||
|
||||
shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// assignment
|
||||
|
||||
shared_array & operator=( shared_array const & r ) // never throws
|
||||
{
|
||||
this_type( r ).swap( *this );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset(T * p = 0)
|
||||
{
|
||||
|
@ -203,7 +203,17 @@ public:
|
||||
boost::detail::sp_enable_shared_from_this( this, p, p );
|
||||
}
|
||||
|
||||
// generated copy constructor, destructor are fine
|
||||
// generated copy constructor, destructor are fine...
|
||||
|
||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
||||
|
||||
// ... except in C++0x, move disables the implicit copy
|
||||
|
||||
shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class Y>
|
||||
explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
|
||||
|
@ -40,8 +40,24 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// generated copy constructor, assignment, destructor are fine
|
||||
// generated copy constructor, assignment, destructor are fine...
|
||||
|
||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
||||
|
||||
// ... except in C++0x, move disables the implicit copy
|
||||
|
||||
weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
|
||||
{
|
||||
}
|
||||
|
||||
weak_ptr & operator=( weak_ptr const & r ) // never throws
|
||||
{
|
||||
px = r.px;
|
||||
pn = r.pn;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// The "obvious" converting constructor implementation:
|
||||
|
Reference in New Issue
Block a user