Created on 2021-09-18.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4892.
Modify [common.iter.access] as indicated:
decltype(auto) operator->() const requires see below;-3- […]
-4- […] -5- Effects:
(5.1) — […]
(5.2) — […]
(5.3) — Otherwise, equivalent to: return proxy(*get<I>(v_)); where proxy is the exposition-only class:
class proxy { iter_value_t<I> keep_; constexpr proxy(iter_reference_t<I>&& x) : keep_(std::move(x)) {} public: constexpr const iter_value_t<I>* operator->() const noexcept { return addressof(keep_); } };
Modify [common.iter.nav] as indicated:
decltype(auto) operator++(int);-4- […]
-5- Effects: If I models forward_iterator, equivalent to: […] Otherwise, if […] […] Otherwise, equivalent to:postfix-proxy p(**this); ++*this; return p;where postfix-proxy is the exposition-only class:
class postfix-proxy { iter_value_t<I> keep_; constexpr postfix-proxy(iter_reference_t<I>&& x) : keep_(std::forward<iter_reference_t<I>>(x)) {} public: constexpr const iter_value_t<I>& operator*() const noexcept { return keep_; } };
[ 2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting → WP. ]
[ 2021-09-24; Reflector poll ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
LWG 3574 added constexpr to all member functions and friends of common_iterator to make it fully constexpr, but accidentally omitted the exposition-only classes proxy and postfix-proxy defined for some member functions. We should make these two classes fully constexpr, too.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2021-10-14 09:56:08 | admin | set | messages: + msg12145 |
2021-10-14 09:56:08 | admin | set | status: voting -> wp |
2021-09-29 12:57:28 | admin | set | status: ready -> voting |
2021-09-24 17:55:02 | admin | set | messages: + msg12075 |
2021-09-24 17:55:02 | admin | set | status: new -> ready |
2021-09-19 12:29:34 | admin | set | messages: + msg12044 |
2021-09-18 00:00:00 | admin | create |