cpp/iterator/common iterator/operator-

Computes the distance between two iterator adaptors. Two sentinels are considered equal.

Let denote the underlying std member object in std, the behavior is undefined if either  or  is invalid, i.e. is.

Return value

 * if holds an  object and  holds an  object, i.e. both of them hold a sentinel.
 * Otherwise,, where and  are the alternatives held by  and , respectively (either two iterators or one iterator and one sentinel).