Title
String::erase(range) yields wrong iterator
Status
tc1
Section
[string.erase]
Submitter
Nathan Myers

Created on 1998-08-06.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In [string.erase], paragraph 10, change:

Returns: an iterator which points to the element immediately following _last_ prior to the element being erased.

to read

Returns: an iterator which points to the element pointed to by _last_ prior to the other elements being erased.

Date: 1998-08-06.00:00:00

The string::erase(iterator first, iterator last) is specified to return an element one place beyond the next element after the last one erased. E.g. for the string "abcde", erasing the range ['b'..'d') would yield an iterator for element 'e', while 'd' has not been erased.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg62
1998-08-06 00:00:00admincreate