Created on 2016-11-29.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4618.
Edit [string.capacity] as indicated:
void shrink_to_fit();[…]
-15- Remarks: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence as well as the past-the-end iterator. If no reallocation happens, they remain valid.
Edit [deque.capacity] as indicated:
void shrink_to_fit();[…]
-8- Remarks: shrink_to_fit invalidates all the references, pointers, and iterators referring to the elements in the sequence as well as the past-the-end iterator.
Edit [vector.capacity] as indicated:
void shrink_to_fit();[…]
-10- Remarks: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence as well as the past-the-end iterator. If no reallocation happens, they remain valid.
[ 2017-01-27 Telecon ]
Priority 0
The resolution of LWG 2223 added the wording "Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence." to a number of shrink_to_fit operations.
This seems to be missing any mention of end iterators. Surely end iterators are invalidated, too? Suggested resolution: For string, deque, and vector each, append as follows: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence as well as the past-the-end iterator.History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2017-03-05 23:41:16 | admin | set | status: ready -> wp |
2017-01-30 15:17:53 | admin | set | messages: + msg8809 |
2017-01-30 15:17:53 | admin | set | status: new -> ready |
2016-12-14 19:23:41 | admin | set | messages: + msg8716 |
2016-11-29 00:00:00 | admin | create |