From 6eefc6bf81a0edef950e3582a06826ff32e167c2 Mon Sep 17 00:00:00 2001
From: Peter Dimov 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.