Created on 2021-05-18.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4885.
Modify [range.split.outer.value], class split_view::outer-iterator::value_type synopsis, as indicated:
[…]namespace std::ranges { template<input_range V, forward_range Pattern> requires view<V> && view<Pattern> && indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>) template<bool Const> struct split_view<V, Pattern>::outer-iterator<Const>::value_type : view_interface<value_type> { private: outer-iterator i_ = outer-iterator(); // exposition only public: value_type() = default; constexpr explicit value_type(outer-iterator i); constexpr inner-iterator<Const> begin() constrequires copyable<outer-iterator>;constexpr inner-iterator<Const> begin() requires (!copyable<outer-iterator>);constexpr default_sentinel_t end() const; }; }constexpr inner-iterator<Const> begin() constrequires copyable<outer-iterator>;-2- Effects: Equivalent to: return inner-iterator<Const>{i_};
constexpr inner-iterator<Const> begin() requires (!copyable<outer-iterator>);[…]
-3- Effects: Equivalent to: return inner-iterator<Const>{std::move(i_)};
[ 2021-06-07 Approved at June 2021 virtual plenary. Status changed: Voting → WP. ]
[ 2021-05-26; Reflector poll ]
Set status to Tentatively Ready after five votes in favour during reflector poll.
The copyable constraint in split_view::outer-iterator::value_type::begin() is useless because outer-iterator always satisfies copyable.
When V does not model forward_range, the outer-iterator only contains a pointer, so it is obviously copyable; When V is a forward_range, the iterator_t<Base> is a forward_iterator, so it is copyable, which makes outer-iterator also copyable. Suggested resolution: Remove the no-const begin() and useless copyable constraint in [range.split.outer.value].History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2021-06-07 16:58:04 | admin | set | messages: + msg11915 |
2021-06-07 16:58:04 | admin | set | status: voting -> wp |
2021-05-26 21:11:22 | admin | set | status: ready -> voting |
2021-05-26 10:53:33 | admin | set | messages: + msg11858 |
2021-05-26 10:53:33 | admin | set | status: new -> ready |
2021-05-22 19:58:55 | admin | set | messages: + msg11842 |
2021-05-18 00:00:00 | admin | create |