cpp/iterator/common iterator/operator cmp

Compares the iterators and/or sentinels held by underlying std member objects. Two incomparable iterators or two sentinels are considered equal.

The behavior is undefined if either or  is in an invalid state, i.e. is equal to.

Let be  and  be.

@1@ if (i.e. both  and  hold iterators or both hold sentinels), returns, otherwise returns ;

@2@ if (i.e. both  and  hold sentinels), returns, otherwise returns.

Return value
if underlying iterators and/or sentinels are equal.