Created on 2022-06-09.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4910.
Modify [range.chunk.view.input] as indicated:
[…]namespace std::ranges { […] template<view V> requires input_range<V> class chunk_view : public view_interface<chunk_view<V>> { V base_ = V(); // exposition only […] public: […] constexpr outer-iterator begin(); constexpr default_sentinel_t end() const noexcept; constexpr auto size() requires sized_range<V>; constexpr auto size() const requires sized_range<const V>; }; […] }constexpr default_sentinel_t end() const noexcept;-4- Returns: default_sentinel.
[ 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 eight votes in favour during reflector poll.
The input range version of chunk_view's end is a very simple function that only returns default_sentinel, and simple ends like this also appear in other range adaptors, such as basic_istream_view, lazy_split_view::outer-iterator::value_type, and chunk_view::outer-iterator::value_type.
However, unlike chunk_view, their ends all are const-qualified, which allows us to freely get default_sentinel through the end of these const objects even though they may not themselves be ranges. I think we should add const to this chunk_view's end as I don't see any harm in doing this, and in some cases, it may have a certain value. Also, this makes it consistent with basic_istream_view and the upcoming std::generator, which, like it, only has a non-const begin.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: + msg12651 |
2022-07-25 20:32:58 | admin | set | status: ready -> wp |
2022-07-25 20:28:19 | admin | set | messages: + msg12625 |
2022-06-21 11:47:28 | admin | set | messages: + msg12521 |
2022-06-21 11:47:28 | admin | set | status: new -> ready |
2022-06-11 14:54:07 | admin | set | messages: + msg12491 |
2022-06-09 00:00:00 | admin | create |