Created on 2020-06-26.00:00:00 last changed 54 months ago
Proposed resolution:
This wording is relative to N4861.
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.
[ 2020-07-05; Reflector prioritization ]
Set priority to 3 after reflector discussions.
[ 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.
[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.
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:36 | admin | set | messages: + msg11355 |
2020-07-05 14:54:36 | admin | set | messages: + msg11354 |
2020-06-26 13:22:34 | admin | set | messages: + msg11350 |
2020-06-26 00:00:00 | admin | create |