This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

### 899. Adjusting `shared_ptr` for `nullptr_t`

Section: 20.3.2.2.3 [util.smartptr.shared.dest] Status: C++11 Submitter: Peter Dimov Opened: 2008-09-18 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [util.smartptr.shared.dest].

View all issues with C++11 status.

Discussion:

James Dennett, message c++std-lib-22442:

> The wording below addresses one case of this, but opening an issue to address the need to sanity check uses of the term "pointer" in 20.3.2.2 [util.smartptr.shared] would be a good thing.

There's one more reference, in `~shared_ptr;` we can apply your suggested change to it, too. That is:

Change 20.3.2.2.3 [util.smartptr.shared.dest]/1 second bullet from:

> Otherwise, if *this owns a pointer p and a deleter d, d(p) is called.

to:

> Otherwise, if *this owns an object p and a deleter d, d(p) is called.

[ Post Summit: ]

> Recommend Review.

[ Batavia (2009-05): ]

> Peter Dimov notes the analogous change has already been made to "the new `nullptr_t` taking constructors in 20.3.2.2.2 [util.smartptr.shared.const] p9-13."

> We agree with the proposed resolution. Move to Tentatively Ready.

Proposed resolution:

Change 20.3.2.2.3 [util.smartptr.shared.dest] p1 second bullet:

> - ...
> - Otherwise, if `*this` owns a pointer an object `p` and a deleter `d`, `d(p)` is called.