std::ranges::split_view<V,Pattern>::iterator
(exposition only*)
The return type of split_view::begin. This is a forward_iterator
, so it is expected that V
models at least forward_range
.
Contents
- 1 Member types
- 2 Data members
- 3 Member functions
- 4 std::ranges::split_view::iterator::iterator
- 5 std::ranges::split_view::iterator::base
- 6 std::ranges::split_view::iterator::operator*
- 7 std::ranges::split_view::iterator::operator++
- 8 operator==(std::ranges::split_view::iterator, std::ranges::split_view::iterator)
[edit] Member types
iterator_concept
std::forward_iterator_tag
iterator_category
std::input_iterator_tag
value_type
ranges::subrange <ranges::iterator_t <V>>
difference_type
ranges::range_difference_t <V>
[edit] Data members
parent_
(private)
a pointer to the parent split_view object(exposition-only member object*)
cur_
(private)
an iterator into the underlying view
that points to the begin of a current subrange(exposition-only member object*)
next_
(private)
a subrange to the position of the pattern next to the current subrange(exposition-only member object*)
trailing_empty_
(private)
a flag that indicates whether an empty trailing subrange (if any) was reached(exposition-only member object*)
[edit] Member functions
(public member function)
(public member function)
(public member function)
(public member function)
std::ranges::split_view::iterator::iterator
ranges::subrange <ranges::iterator_t <V>> next );
- ranges::split_view * parent_ = nullptr;,
- ranges::iterator_t <V> cur_ = ranges::iterator_t <V>();,
- ranges::subrange <ranges::iterator_t <V>> next_ = ranges::subrange <ranges::iterator_t <V>>();, and
- bool trailing_empty_ = false;.
- ranges::split_view * parent_ = std::addressof (parent);,
- ranges::iterator_t <V> cur_ = std::move(current);,
- ranges::subrange <ranges::iterator_t <V>> next_ = std::move(next);, and
- bool trailing_empty_ = false;.
std::ranges::split_view::iterator::base
Equivalent to return cur_;.
std::ranges::split_view::iterator::operator*
Equivalent to return {cur_, next_.begin()};.
std::ranges::split_view::iterator::operator++
cur_ = next_.begin();
if (cur_ != ranges::end (parent_->base_))
{
if (cur_ = next_.end(); cur_ == ranges::end (parent_->base_))
{
trailing_empty_ = true;
next_ = {cur_, cur_};
}
else
next_ = parent_->find_next(cur_);
}
else
trailing_empty_ = false;
[edit] Non-member functions
(function)
operator==(std::ranges::split_view::iterator, std::ranges::split_view::iterator)
Equivalent to return x.cur_ == y.cur_ and x.trailing_empty_ == y.trailing_empty_;.
The !=
operator is synthesized from operator==
.
This function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::ranges::split_view::iterator
is an associated class of the arguments.