Re: [PATCH] libstdc++: Adjust how __gnu_debug::vector detects invalidation

2025-03-25 Thread Tomasz Kaminski
On Tue, Mar 25, 2025 at 12:26 PM Jonathan Wakely wrote: > The new C++23 member functions assign_range, insert_range and > append_range were checking whether the begin() iterator changed after > calling the base class member. That works, but is technically undefined > when the original iterator ha

[PATCH] libstdc++: Adjust how __gnu_debug::vector detects invalidation

2025-03-25 Thread Jonathan Wakely
The new C++23 member functions assign_range, insert_range and append_range were checking whether the begin() iterator changed after calling the base class member. That works, but is technically undefined when the original iterator has been invalidated by a change in capacity. We can just check the