Created on 2023-03-13.00:00:00 last changed 18 months ago
Proposed resolution:
This wording is relative to N4928.
Modify [range.lazy.split.outer] as indicated:
constexpr outer-iterator(outer-iterator<!Const> i) requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;-4- Effects: Initializes parent_ with i.parent_,
andcurrent_ with std::move(i.current_), and trailing_empty_ with i.trailing_empty_.
[ 2023-06-17 Approved at June 2023 meeting in Varna. Status changed: Voting → WP. ]
[ 2023-05-24; Reflector poll ]
Set status to Tentatively Ready after five votes in favour during reflector poll.
It seems the const-converting constructor for lazy_split_view's iterator fails to propagate trailing_empty_ from the argument, which effectively results in the trailing empty range getting skipped over:
auto r = views::single(0) | views::lazy_split(0); // r is { {}, {} } auto i = r.begin(); ++i; // i.trailing_empty_ is correctly true decltype(std::as_const(r).begin()) j = i; // j.trailing_empty_ is incorrectly false auto k = r.end(); // k.trailing_empty_ is correctly false, and we wrongly have j == k
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-06-19 14:50:03 | admin | set | messages: + msg13649 |
2023-06-19 14:50:03 | admin | set | status: voting -> wp |
2023-06-12 08:52:25 | admin | set | status: ready -> voting |
2023-05-24 14:04:16 | admin | set | messages: + msg13557 |
2023-05-24 14:04:16 | admin | set | status: new -> ready |
2023-03-18 14:42:23 | admin | set | messages: + msg13456 |
2023-03-13 00:00:00 | admin | create |