Title
non-const basic_string::data should not invalidate iterators
Status
c++17
Section
[string.require]
Submitter
Billy Baker

Created on 2016-08-03.00:00:00 last changed 89 months ago

Messages

Date: 2016-08-04.03:06:12

Proposed resolution:

This wording is relative to N4606.

  1. Change [string.require]/4 as indicated:

    -4- References, pointers, and iterators referring to the elements of a basic_string sequence may be invalidated by the following uses of that basic_string object:

    • as an argument to any standard library function taking a reference to non-const basic_string as an argument.(footnote 230)

    • Calling non-const member functions, except operator[], at, data, front, back, begin, rbegin, end, and rend.

Date: 2016-08-04.03:06:12

[ 2016-08 Chicago ]

Wed PM: Move to Tentatively Ready

Date: 2016-08-03.00:00:00

[string.require]/4 does not list non-const basic_string::data() as being a function that may be called with the guarantee that it will not invalidate references, pointers, and iterators to elements of a basic_string object.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-11-14 03:59:28adminsetstatus: pending -> wp
2016-11-14 03:55:22adminsetstatus: ready -> pending
2016-08-04 03:06:12adminsetmessages: + msg8391
2016-08-04 03:06:12adminsetstatus: new -> ready
2016-08-03 17:51:16adminsetmessages: + msg8369
2016-08-03 00:00:00admincreate