An end iterator is used to distinguish an open end of an iterator range. Since the end iterator points to the open end of the range, the end iterator does not point to the last element in the range, but just beyond the last element of the range. If the last element in the range happens to be the last element in the container, the end iterator does not point to a valid element. This behavior is the same which is present in the STL.