Index: libs/smart_ptr/shared_ptr.htm =================================================================== --- libs/smart_ptr/shared_ptr.htm (revision 44758) +++ libs/smart_ptr/shared_ptr.htm (working copy) @@ -115,6 +115,8 @@ template<class Y> explicit shared_ptr(weak_ptr<Y> const & r); template<class Y> explicit shared_ptr(std::auto_ptr<Y> & r); + shared_ptr(unspecified-reference-counter-type const & c, T * p); // never throws + shared_ptr & operator=(shared_ptr const & r); // never throws template<class Y> shared_ptr & operator=(shared_ptr<Y> const & r); // never throws template<class Y> shared_ptr & operator=(std::auto_ptr<Y> & r); @@ -128,6 +130,7 @@ T & operator*() const; // never throws T * operator->() const; // never throws T * get() const; // never throws + unspecified-reference-counter-type const & get_shared_count() const; // never throws bool unique() const; // never throws long use_count() const; // never throws @@ -257,10 +260,8 @@
template<class Y> shared_ptr(shared_ptr<Y> const & r, T * p); // never throws
-

Effects: constructs a shared_ptr that shares ownership with - r and stores p.

-

Postconditions: get() == p && use_count() == r.use_count().

-

Throws: nothing.

+

Effects: Equivalent to + shared_ptr(r.get_shared_count(), p).

template<class Y> explicit shared_ptr(weak_ptr<Y> const & r);
@@ -284,6 +285,15 @@ not by value, and cannot accept auto_ptr temporaries. This is by design, as the constructor offers the strong guarantee; an rvalue reference would solve this problem, too.]

+
shared_ptr(unspecified-reference-counter-type const & c, T * p); // never throws
+
+

Requirements: c was retrieved from a shared_ptr instance r through + r.get_shared_count().

+

Effects: constructs a shared_ptr that shares ownership with + r and stores p.

+

Postconditions: get() == p && use_count() == r.use_count().

+

Throws: nothing.

+

destructor

~shared_ptr(); // never throws
@@ -360,6 +370,14 @@

Returns: the stored pointer.

Throws: nothing.

+

get_shared_count

+
unspecified-reference-counter-type const & get_shared_count() const; // never throws
+
+

Returns: the stored reference counter.

+

Throws: nothing.

+

Notes: get_shared_count() is passed directly to the corresponding + constructor.

+

unique

bool unique() const; // never throws