Title
shared_ptr's get_deleter() should use addressof()
Status
c++17
Section
[util.smartptr.getdeleter]
Submitter
Stephan T. Lavavej

Created on 2014-06-14.00:00:00 last changed 89 months ago

Messages

Date: 2014-06-16.23:43:35

Proposed resolution:

This wording is relative to N3936.

  1. Change [util.smartptr.getdeleter] as indicated:

    template <class D, class T> get_deleter(const shared_ptr<T>& p) noexcept;
    

    -1- Returns: If p owns a deleter d of type cv-unqualified D, returns &std::addressof(d); otherwise returns 0nullptr. […]

Date: 2014-06-16.00:00:00

[ 2014-06-16 Rapperswil ]

Move to Ready

Date: 2014-06-16.23:43:35

The Standard Library should consistently use addressof() to defend itself against overloaded operator&().

While we're in the neighbourhood, we should editorially change 0 to nullptr.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2014-11-08 19:44:42adminsetstatus: voting -> wp
2014-11-04 10:26:50adminsetstatus: ready -> voting
2014-06-16 23:43:35adminsetmessages: + msg7053
2014-06-16 23:43:35adminsetstatus: new -> ready
2014-06-14 17:28:50adminsetmessages: + msg7031
2014-06-14 00:00:00admincreate