cpp/iterator/ranges/advance

@1@ Increments given iterator for  times. @2@ Increments given iterator until. @3@ Increments given iterator for  times, or until, whichever comes first.

If is negative, the iterator is decremented. In this case, must model std, and  must be the same type as  if  is provided, otherwise the behavior is undefined.

Return value
@3@ The difference between and the actual distance  traversed.

Complexity
Linear.

However, if additionally models std, or  models, or  and  model , complexity is constant.