This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofTC1 status.
Section: 24.3.4[iterator.concepts]Status:TC1Submitter: Stephen ClearyOpened: 2000-02-02Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [iterator.concepts].
View all issues withTC1 status.
Discussion:
In 24.1 paragraph 5, it is stated ". . . Dereferenceable andpast-the-end values are always non-singular."
This places an unnecessary restriction on past-the-end iterators forcontainers with forward iterators (for example, a singly-linked list). If thepast-the-end value on such a container was a well-known singular value, it wouldstill satisfy all forward iterator requirements.
Removing this restriction would allow, for example, a singly-linked listwithout a "footer" node.
This would have an impact on existing code that expects past-the-enditerators obtained from different (generic) containers being not equal.
Proposed resolution:
Change 24.3.4[iterator.concepts] paragraph 5, the last sentence, from:
Dereferenceable and past-the-end values are always non-singular.
to:
Dereferenceable values are always non-singular.
Rationale:
For some kinds of containers, including singly linked lists andzero-length vectors, null pointers are perfectly reasonable past-the-enditerators. Null pointers are singular.