Add copy constructor/assignment - in C++0x, move disables implicit copy.

[SVN r73202]
This commit is contained in:
Peter Dimov
2011-07-17 20:35:44 +00:00
parent b4b415553c
commit 7e9664396a
3 changed files with 47 additions and 3 deletions
+19 -1
View File
@@ -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)
{