|
Range primitives | |||||||
|
Range concepts | |||||||||||||||||||
|
Range factories | |||||||||
|
Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Helper items | |||||||||||||||||
|
class/*iterator*/; | (since C++20) (exposition only*) | |
The return type ofsplit_view::begin. This is aforward_iterator
, so it is expected thatV
models at leastforward_range
.
Contents |
Member type | Definition |
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> |
Member | Description |
ranges::split_view<V, Pattern>*parent_ (private) | a pointer to the parentsplit_view object (exposition-only member object*) |
ranges::iterator_t<V>cur_ (private) | an iterator into the underlyingview that points to the begin of a current subrange(exposition-only member object*) |
ranges::subrange<ranges::iterator_t<V>>next_ (private) | a subrange to the position of the pattern next to the current subrange (exposition-only member object*) |
booltrailing_empty_ (private) | a flag that indicates whether an empty trailing subrange (if any) was reached (exposition-only member object*) |
(constructor) (C++20) | constructs an iterator (public member function) |
base (C++20) | returns the underlying iterator (public member function) |
operator* (C++20) | returns the current subrange (public member function) |
operator++operator++(int) (C++20) | advances the iterator (public member function) |
/*iterator*/()=default; | (1) | (since C++20) |
constexpr/*iterator*/( split_view& parent,ranges::iterator_t<V> current, ranges::subrange<ranges::iterator_t<V>> next); | (2) | (since C++20) |
constexprconstranges::iterator_t<V> base()const; | (since C++20) | |
Equivalent toreturn cur_;.
constexpr value_type operator*()const; | (since C++20) | |
Equivalent toreturn{cur_, next_.begin()};.
constexpr/*iterator*/& operator++(); | (1) | (since C++20) |
constexprvoid operator++(int); | (2) | (since C++20) |
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;
operator== (C++20) | compares the underlying iterators (function) |
friendconstexprbool operator==(const/*iterator*/& x,const/*iterator*/& y); | (since C++20) | |
Equivalent toreturn x.cur_== y.cur_ and x.trailing_empty_== y.trailing_empty_;.
The!=
operator issynthesized fromoperator==
.
This function is not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup whenstd::ranges::split_view::iterator
is an associated class of the arguments.