A RetroSearch Logo

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

Search Query:

Showing content from https://sgistl.github.io/advance.html below:

advance

advance Prototype
template <class InputIterator, class Distance>
void advance(InputIterator& i, Distance n);
DescriptionAdvance(i, n) increments the iterator i by the distance n. If n > 0 it is equivalent to executing ++i n times, and if n < 0 it is equivalent to executing --i n times. If n == 0, the call has no effect. Definition Defined in the standard header iterator, and in the nonstandard backward-compatibility header iterator.h. Requirements on types Preconditions Complexity Constant time if InputIterator is a model of random access iterator, otherwise linear time. Example
list<int> L;
L.push_back(0);
L.push_back(1);

list<int>::iterator i = L.begin();
advance(i, 2);
assert(i == L.end());
Notes See alsodistance, Input iterator, Bidirectional Iterator, Random access iterator, iterator_traits, Iterator overview. STL Main Page

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