Does this clause always return true for standard containers?

 container.end() == container.cend(); 

1 answer 1

Yes, always. Iterators pointing to the same position in the container should be equal, even if they differ in type (normal vs. constantan).

See 23.2.1 / 7

In the expressions
i == j
i! = j
i <j
i <= j
i> = j
i> j
i - j
For example, it can be used to refer to the semantics .

  • And should these types always always be comparable? - VladD
  • four
    @VladD is obtained, yes - mary