Iterator
Iterator: hasValue, value, increment
interface Iterator<Element>
An iterator is an object used to traverse the elements of a sequence.
hasValue
bool hasValue();Returns true if there's at least one element remaining in the
sequence, i.e. if calling value() is allowed.
value
Element value();Returns the next element from the sequence. Calling this function is
not allowed if hasValue() returns false.
increment
void increment();Advances the iterator to the next element in the sequence. Calling
this function is not allowed if hasValue() returns
false.
all
bool all<T, I>(I& it, bool(T&) predicate)Returns true if all remaining elements satisfy the predicate.
bool all<T: Copyable, I>(I& it, bool(T) predicate)Returns true if all remaining elements satisfy the predicate.
any
bool any<T, I>(I& it, bool(T&) predicate)Returns true if any remaining element satisfies the predicate.
bool any<T: Copyable, I>(I& it, bool(T) predicate)Returns true if any remaining element satisfies the predicate.
none
bool none<T, I>(I& it, bool(T&) predicate)Returns true if no remaining element satisfies the predicate.
bool none<T: Copyable, I>(I& it, bool(T) predicate)Returns true if no remaining element satisfies the predicate.