Title
Can singular iterators be destroyed?
Status
cd1
Section
[iterator.concepts]
Submitter
Nathan Myers

Created on 2003-06-03.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

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."

Date: 2003-06-03.00:00:00

Clause [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.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2513
2003-06-03 00:00:00admincreate