Movatterモバイル変換


[0]ホーム

URL:



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

27. String::erase(range) yields wrong iterator

Section: 27.4.3.7.5[string.erase]Status:TC1Submitter: Nathan MyersOpened: 1998-08-06Last modified: 2016-11-12

Priority:Not Prioritized

View all otherissues in [string.erase].

View all issues withTC1 status.

Discussion:

The string::erase(iterator first, iterator last) is specified to return an element oneplace 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.

Proposed resolution:

In 27.4.3.7.5[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.


[8]ページ先頭

©2009-2026 Movatter.jp