Section: 99 [iterator.concepts] Status: CD1 Submitter: Nathan Myers Opened: 2003-06-03 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [iterator.concepts].
View all issues with CD1 status.
Clause 99 [iterator.concepts], paragraph 5, says that the only expression that is defined for a singular iterator is "an assignment of a non-singular value to an iterator that holds a singular value". This means that destroying a singular iterator (e.g. letting an automatic variable go out of scope) is technically undefined behavior. This seems overly strict, and probably unintentional.
Change the sentence in question to "... the only exceptions are destroying an iterator that holds a singular value, or the assignment of a non-singular value to an iterator that holds a singular value."