This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.
Section: 20.2.4 [pointer.conversion] Status: C++20 Submitter: Billy O'Neal III Opened: 2020-01-14 Last modified: 2021-02-25
View all issues with C++20 status.
While reviewing some interactions with P0653 + P1006, Billy discovered that one of the overloads was missing the constexpr tag. This might be a typo or a missed merge interaction between P0653 (which adds to_address with the pointer overload being constexpr) and P1006 (which makes pointer_traits::pointer_to constexpr). Mail was sent the LWG reflector, and Glen Fernandes, the author of P0653, indicates that this might have been an oversight.
[2020-02-01 Status set to Tentatively Ready after seven positive votes on the reflector.]
This wording is relative to N4842.
Modify 20.2.2 [memory.syn], header <memory> synopsis, as indicated:
[…] // 20.2.4 [pointer.conversion], pointer conversion template<class T> constexpr T* to_address(T* p) noexcept; template<class Ptr> auto to_address(const Ptr& p) noexcept; […]
Modify 20.2.4 [pointer.conversion] as indicated:
template<class Ptr> auto to_address(const Ptr& p) noexcept;
-3- Returns: pointer_traits<Ptr>::to_address(p) if that expression is well-formed (see 184.108.40.206 [pointer.traits.optmem]), otherwise to_address(p.operator->()).