970. addressof overload unneeded

Section: 20.2.11 [specialized.addressof] Status: C++11 Submitter: Howard Hinnant Opened: 2009-01-16 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [specialized.addressof].

View all issues with C++11 status.

Discussion:

20.2.11 [specialized.addressof] specifies:

template <ObjectType T> T* addressof(T& r);
template <ObjectType T> T* addressof(T&& r);

The two signatures are ambiguous when the argument is an lvalue. The second signature seems not useful: what does it mean to take the address of an rvalue?

[ Post Summit: ]

Recommend Review.

[ Batavia (2009-05): ]

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

[ 2009-11-18 Moved from Pending WP to WP. Confirmed in N3000. ]

Proposed resolution:

Change 20.2.11 [specialized.addressof]:

template <ObjectType T> T* addressof(T& r);
template <ObjectType T> T* addressof(T&& r);