Why is “!=” used with iterators instead of “
All iterators are equality comparable. Only random access iterators are relationally comparable. Input iterators, forward iterators, and bidirectional iterators are not relationally comparable. Thus, the comparison using != is more generic and flexible than the comparison using <. There are different categories of iterators because not all ranges of elements have the same access properties. … Read more