This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
407. Can singular iterators be destroyed?Section: 24.3.4 [iterator.concepts] Status: CD1 Submitter: Nathan Myers Opened: 2003-06-03 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [iterator.concepts].
View all issues with CD1 status.
Discussion:
Clause 24.3.4 [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.
Proposed resolution:
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."
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4