concept bool Iterator =
requires(I i) {
{ *i } -> auto&&; // Requires: i is dereferenceable
} &&
The Iterator
concept forms the basis of the iterator concept taxonomy; every iterator satisfies the Iterator
requirements.
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] NotesIterator
itself only specifies operations for dereferencing and incrementing an iterator. Most algorithms will require additional operations, for example:
Sentinel
);Readable
and InputIterator
);Writable
and OutputIterator
);ForwardIterator
, BidirectionalIterator
, RandomAccessIterator
).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