Created on 2000-02-02.00:00:00 last changed 172 months ago
Rationale:
For some kinds of containers, including singly linked lists and zero-length vectors, null pointers are perfectly reasonable past-the-end iterators. Null pointers are singular.
Proposed resolution:
Change [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.
In 24.1 paragraph 5, it is stated ". . . Dereferenceable and past-the-end values are always non-singular."
This places an unnecessary restriction on past-the-end iterators for containers with forward iterators (for example, a singly-linked list). If the past-the-end value on such a container was a well-known singular value, it would still satisfy all forward iterator requirements.
Removing this restriction would allow, for example, a singly-linked list without a "footer" node.
This would have an impact on existing code that expects past-the-end iterators obtained from different (generic) containers being not equal.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg1862 |
2010-10-21 18:28:33 | admin | set | messages: + msg1861 |
2000-02-02 00:00:00 | admin | create |