Created on 2022-06-01.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4910.
Modify [range.chunk.outer.value] as indicated:
constexpr auto size() const requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;-4- Effects: Equivalent to:
return to-unsigned-like(ranges::min(parent_->remainder_, ranges::end(parent_->base_) - *parent_->current_));
[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]
[ 2022-07-15; LWG telecon: move to Ready ]
[ 2022-06-21; Reflector poll ]
Set status to Tentatively Ready after five votes in favour during reflector poll.
Currently, the size function of chunk_view::outer-iterator::value_type returns the result of ranges::min, since the operands are of type range_difference_t<V>, this will return a signed type, which is inconsistent with the return type of size of the forward-version of chunk_view::iterator::value_type ([range.chunk.fwd.iter]), which always returns an unsigned type.
I think it's more reasonable to return an unsigned type, since this is intentional behavior and doesn't fall back to using the default view_interface::size. And if LWG 3646 is eventually adopted, there's no reason why it shouldn't be made unsigned.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-07-25 20:32:58 | admin | set | messages: + msg12648 |
2022-07-25 20:32:58 | admin | set | status: ready -> wp |
2022-07-25 20:28:19 | admin | set | messages: + msg12622 |
2022-06-21 11:47:28 | admin | set | messages: + msg12518 |
2022-06-21 11:47:28 | admin | set | status: new -> ready |
2022-06-05 07:14:48 | admin | set | messages: + msg12485 |
2022-06-01 00:00:00 | admin | create |