Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofResolved status.

1210. Iterator reachability should not require a container

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 iteratorj is called reachable from an iteratori if and only ifthere is a finite sequence of applications of the expression++i thatmakesi == j. Ifj is 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:

Ifj is reachable fromi, and bothi andj are 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 iteratorj is calledreachable from an iteratori if and only if there is a finite sequence of applications ofthe expression++i that makesi == j.Ifj is reachable fromi, they refer to the samecontainer.


[8]ページ先頭

©2009-2026 Movatter.jp