A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue2400 below:

shared_ptr's get_deleter() should use addressof()

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

2400. 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&().

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

[2014-06-16 Rapperswil]

Move to Ready

Proposed resolution:

This wording is relative to N3936.

  1. 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 p owns a deleter d of type cv-unqualified D, returns & std::addressof(d ); otherwise returns 0 nullptr. […]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4