Title
*this is not invalidated
Status
new
Section
[string.view.template]
Submitter
Johel Ernesto Guerrero Peña

Created on 2020-06-26.00:00:00 last changed 54 months ago

Messages

Date: 2020-07-05.14:54:36

Proposed resolution:

This wording is relative to N4861.

  1. Modify [string.view.template] as indicated:

    -2- For a basic_string_view str, any operation that invalidates a pointer in the range [str.data(), str.data() + str.size()) invalidates pointers, iterators, and references to the elements in that range and its past-the-end iteratorreturned from str's member functions.

Date: 2020-07-15.00:00:00

[ 2020-07-05; Reflector prioritization ]

Set priority to 3 after reflector discussions.

Date: 2020-06-15.00:00:00

[ 2020-06-29; Casey comments and provides alternative proposed wording ]

I think we should additionally strike "returned from str's member functions" from the end of the sentence. Provenance shouldn't affect invalidation; ranges::next(some_string_view.begin(), 42), for example, returns an iterator that denotes an element of some_string_view, but is not a member function of basic_string_view.

Date: 2020-07-05.14:54:36

[string.view.template] states:

For a basic_string_view str, any operation that invalidates a pointer in the range [str.data(), str.data() + str.size()) invalidates pointers, iterators, and references returned from str's member functions.

The assignment operators return a reference to *this, but *this is not invalidated.

Previous resolution [SUPERSEDED]:

This wording is relative to N4861.

  1. Modify [string.view.template] as indicated:

    -2- For a basic_string_view str, any operation that invalidates a pointer in the range [str.data(), str.data() + str.size()) invalidates pointers, iterators, and references to the elements in that range and its past-the-end iterator returned from str's member functions.

History
Date User Action Args
2020-07-05 14:54:36adminsetmessages: + msg11355
2020-07-05 14:54:36adminsetmessages: + msg11354
2020-06-26 13:22:34adminsetmessages: + msg11350
2020-06-26 00:00:00admincreate