cpp/iterator/advance

Increments given iterator by  elements.

If is negative, the iterator is decremented. In this case, must meet the requirements of, otherwise the behavior is undefined.

Return value
(none)

Complexity
Linear.

However, if additionally meets the requirements of, complexity is constant.

Possible implementation
See also the implementations in libstdc++ and libc++.