cpp/ranges/subrange/advance

If, increments the stored iterator for times, or until it is equal to the stored sentinel, whichever comes first. Otherwise, decrements the stored iterator for times.

The stored size, if any, is adjusted accordingly (increased by if, decreased by  otherwise, where  is the number of increments actually applied to the iterator).

The behavior is undefined if
 * does not model and, or
 * the stored iterator is decremented after becoming a non-decrementable value.

Complexity
Generally increments or  decrements on the iterator, when  or  respectively.

Constant if models, and either  or  is modeled.