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/Iterator.html below:

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

template< class I >

concept bool Iterator =
    requires(I i) {
        { *i } -> auto&&; // Requires: i is dereferenceable
    } &&

    WeaklyIncrementable<I>;
(ranges TS)

The Iterator concept forms the basis of the iterator concept taxonomy; every iterator satisfies the Iterator requirements.

[edit] Equality preservation

An expression is equality preserving if it results in equal outputs given equal inputs.

Every expression required to be equality preserving is further required to be stable: two evaluations of such an expression with the same input objects must have equal outputs absent any explicit intervening modification of those input objects.

Unless noted otherwise, every expression used in a requires-expression is required to be equality preserving and stable, and the evaluation of the expression may only modify its non-constant operands. Operands that are constant must not be modified.

[edit] Notes

Iterator itself only specifies operations for dereferencing and incrementing an iterator. Most algorithms will require additional operations, for example:

The -> auto&& constraint implies that the result type of the deference cannot be void.


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