diff --git a/shared_ptr.htm b/shared_ptr.htm index 6c0e999..675fe26 100644 --- a/shared_ptr.htm +++ b/shared_ptr.htm @@ -262,8 +262,12 @@ shared_ptr(std::nullptr_t); // never throws the pointer p. Otherwise, constructs a shared_ptr that owns p and a deleter of an unspecified type that calls delete[] p.

-

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

-

Throws: std::bad_alloc, or an implementation-defined +

Postconditions: use_count() == 1 && get() == p. + If T is not an array type and p is unambiguously convertible to + enable_shared_from_this<V>* + for some V, p->shared_from_this() returns a copy of + *this.

+

Throws: std::bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained.

Exception safety: If an exception is thrown, the constructor calls delete[] p, when T is an array type, @@ -296,7 +300,11 @@ template<class D, class A> shared_ptr(std::nullptr_t p, D d, A a);

Effects: Constructs a shared_ptr that owns the pointer p and the deleter d. The constructors taking an allocator a allocate memory using a copy of a.

-

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

+

Postconditions: use_count() == 1 && get() == p. + If T is not an array type and p is unambiguously convertible to + enable_shared_from_this<V>* + for some V, p->shared_from_this() returns a copy of + *this.

Throws: std::bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained.

Exception safety: If an exception is thrown, d(p) is called.