diff options
| author | François Dumont <frs.dumont@gmail.com> | 2025-11-20 07:01:53 +0100 |
|---|---|---|
| committer | François Dumont <fdumont@gcc.gnu.org> | 2025-11-20 19:10:20 +0100 |
| commit | e166a0f5ee619f3f97107024ae4671dff9708507 (patch) | |
| tree | 29d7d05388239f344f0fff38b73f1384d21a41d5 /libjava/classpath/java/io/UnsupportedEncodingException.java | |
| parent | 8501c7373a6447a961d2251bf4073362cad33832 (diff) | |
libstdc++: [_GLIBCXX_DEBUG] Fix std::erase_if behavior for __gnu_debug::vector
When using directly __gnu_debug::vector the std::erase_if is called with a
reference to the std::vector base class and so is missing the invalidation
of the iterators implied by this operation.
To fix this provide a std::erase_if overload dedicated to __gnu_debug::vector.
Doing so we can cleanup the implementation dedicated to std::vector from any
_GLIBCXX_DEBUG consideration.
libstdc++-v3/ChangeLog:
* include/debug/vector (std::erase_if, std::erase): New overloads for
std::__debug::vector instances.
* include/std/vector (std::erase_if, std::erase): Make overloads specific
to normal std::vector implementation.
* testsuite/23_containers/vector/debug/erase.cc: New test case.
* testsuite/23_containers/vector/debug/invalidation/erase.cc: New test case.
Diffstat (limited to 'libjava/classpath/java/io/UnsupportedEncodingException.java')
0 files changed, 0 insertions, 0 deletions
