Compare commits

...

2 Commits

Author SHA1 Message Date
Beman Dawes
3c99aa7306 Release 1.48.0 beta 1
[SVN r75132]
2011-10-27 15:04:52 +00:00
Peter Dimov
d6ac116b71 Merge [73202] to release.
[SVN r73542]
2011-08-05 08:58:31 +00:00
3 changed files with 47 additions and 3 deletions

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)
{

View File

@@ -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

View File

@@ -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: