shared_ptr's get_deleter() should use addressof()Section: 20.3.2.2.11 [util.smartptr.getdeleter] Status: C++17 Submitter: Stephan T. Lavavej Opened: 2014-06-14 Last modified: 2017-07-30
Priority: 0
View all other issues in [util.smartptr.getdeleter].
View all issues with C++17 status.
Discussion:
The Standard Library should consistently use addressof() to defend itself against overloaded operator&().
0 to nullptr.
[2014-06-16 Rapperswil]
Move to Ready
Proposed resolution:
This wording is relative to N3936.
Change 20.3.2.2.11 [util.smartptr.getdeleter] as indicated:
template <class D, class T> get_deleter(const shared_ptr<T>& p) noexcept;-1- Returns: If
powns a deleterdof type cv-unqualifiedD, returns; otherwise returns&std::addressof(d). […]0nullptr