Section: 126.96.36.199 [range.chunk.outer.value] Status: WP Submitter: Hewill Kang Opened: 2022-06-01 Last modified: 2022-07-25 20:32:58 UTC
Priority: Not Prioritized
View all other issues in [range.chunk.outer.value].
View all issues with WP status.
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 (188.8.131.52 [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.
[2022-06-21; Reflector poll]
Set status to Tentatively Ready after five votes in favour during reflector poll.
[2022-07-15; LWG telecon: move to Ready]
[2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP.]
This wording is relative to N4910.
Modify 184.108.40.206 [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 ranges::min(parent_->remainder_, ranges::end(parent_->base_) - *parent_->current_);