A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../experimental/ranges/iterator/ForwardIterator.html below:

std::experimental::ranges::ForwardIterator - cppreference.com

template< class I >

concept bool ForwardIterator =
    InputIterator<I> &&
    DerivedFrom<ranges::iterator_category_t<I>, ranges::forward_iterator_tag> &&
    Incrementable<I> &&

    Sentinel<I, I>;
(ranges TS)

The concept ForwardIterator<I> refines InputIterator by adding equality comparison and the multi-pass guarantee.

The domain of == for forward iterators is that of iterators over the same underlying sequence, except that value-initialized iterators of the same type may be compared with each other and shall compare equal.

Pointers and references obtained from a forward iterator into a range [is) must remain valid while [is) continues to denote a range.

Let a and b be two dereferenceable iterators of type I. ForwardIterator<I> is satisfied only if:

This is known as the multi-pass guarantee.

[edit] Notes

A forward iterator cannot be "stashing": it cannot return a reference to an object within itself, because such references would be invalidated by the destruction of the forward iterator.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4