Created on 2016-03-06.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4582.
Change [memory.syn], header <memory> synopsis, as indicated:
[…] // 20.9.12, specialized algorithms: template <class T> constexpr T* addressof(T& r) noexcept; template <class T> const T* addressof(const T&& elem) = delete; […]
Change [specialized.addressof] p1 as indicated:
template <class T> constexpr T* addressof(T& r) noexcept; template <class T> const T* addressof(const T&& elem) = delete;-1- Returns: The actual address of the object or function referenced by r, even in the presence of an overloaded operator&.
[ 2016-08 Chicago ]
Tues PM: Move to Tentatively Ready
LWG issue 970 removed the rvalue reference overload for addressof. This allows const prvalues to bind to a call to addressof, which is dissimilar from the behavior of operator&.
const vector<int> a(); void b() { auto x = addressof(a()); // "ok" auto y = addressof<const int>(0); // "ok" auto z = &a(); //error: cannot take address of a temporary }
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-03 12:32:27 | admin | set | messages: + msg8363 |
2016-08-03 12:32:27 | admin | set | status: new -> ready |
2016-04-07 21:11:48 | admin | set | messages: + msg8032 |
2016-03-06 00:00:00 | admin | create |