Created on 2020-01-14.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4842.
Modify [memory.syn], header <memory> synopsis, as indicated:
[…]
// [pointer.conversion], pointer conversion
template<class T>
constexpr T* to_address(T* p) noexcept;
template<class Ptr>
constexpr auto to_address(const Ptr& p) noexcept;
[…]
Modify [pointer.conversion] as indicated:
template<class Ptr> constexpr auto to_address(const Ptr& p) noexcept;-3- Returns: pointer_traits<Ptr>::to_address(p) if that expression is well-formed (see [pointer.traits.optmem]), otherwise to_address(p.operator->()).
[ 2020-02-01 Status set to Tentatively Ready after seven positive votes on the reflector. ]
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 06:37:09 | admin | set | status: ready -> immediate |
2020-02-01 13:19:22 | admin | set | messages: + msg10974 |
2020-02-01 13:19:22 | admin | set | status: new -> ready |
2020-01-18 17:49:42 | admin | set | messages: + msg10949 |
2020-01-14 00:00:00 | admin | create |