|
advancefunction template
<iterator> template <class InputIterator, class Distance> void advance (InputIterator& i, Distance n); Advance iterator Advances the iterator i by n elements.If i is a Random Access Iterator, the function uses once operator+ or operator-, otherwise, the function uses repeatedly the increase or decrease operator (operator++ or operator--) until n elements have been advanced. Parameters
Return valuenoneExample
Output
ComplexityConstant for random access iterators.Linear on n for other categories of iterators. See also
|