forked from boostorg/smart_ptr
Add copy constructor/assignment - in C++0x, move disables implicit copy.
[SVN r73202]
This commit is contained in:
1 parent
b4b415553c
commit
7e9664396a
3 files changed
+47
-3
No files matched your search
@@ -197,7 +197,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
|
||||
|
||||
Reference in new issue
Block a user