...
An iterator range is a pair of iterators first and last that refer to the first element and the one-past-the-end-th element of the range, respectively. It is required that last be reachable from first by repeated increments of first.
Non-
...
Compliant Code Example
...
In this non-compliant example, the two iterators that delimit the range point into the same container, but the first iterator doesn't actually precede the second.
...
Invalid iterator ranges can result from comparison functions that return true for equal values. See STL32-C and Meyers 01.
Non-
...
Compliant Code Example
...
The second common case arises when the iterators point into different containers:
...