This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofResolved status.
Section: 24.3[iterator.requirements]Status:ResolvedSubmitter: Alisdair MeredithOpened: 2009-09-18Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [iterator.requirements].
View all issues withResolved status.
Discussion:
p6 Iterator requirements 24.3[iterator.requirements]
An iterator
jis called reachable from an iteratoriif and only ifthere is a finite sequence of applications of the expression++ithatmakesi == j. Ifjis reachable fromi, they refer to the samecontainer.
A good example would be stream iterators, which do not refer to acontainer. Typically, the end iterator from a range of stream iteratorswill compare equal for many such ranges. I suggest striking the secondsentence.
An alternative wording might be:
If
jis reachable fromi, and bothiandjare dereferencable iterators, then they refer to the samerange.
[2010 Pittsburgh: Moved toNAD EditorialResolved. Rationale added below.]
Rationale:
Solved byN3066.
Proposed resolution:
Change 24.3[iterator.requirements], p6:
An iterator
jis calledreachable from an iteratoriif and only if there is a finite sequence of applications ofthe expression++ithat makesi == j.Ifjis reachable fromi, they refer to the samecontainer.