Re: [PATCH] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-24 Thread Jonathan Wakely
On 24/03/25 10:19 +0100, Tomasz Kaminski wrote: On Sat, Mar 22, 2025 at 9:40 PM Jonathan Wakely wrote: Unlike insert_range and assign_range, the append_range function does not have a precondition that the range doesn't overlap *this. That means we need to avoid relocating the existing elements

Re: [PATCH] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-24 Thread Tomasz Kaminski
On Sat, Mar 22, 2025 at 9:40 PM Jonathan Wakely wrote: > Unlike insert_range and assign_range, the append_range function does not > have a precondition that the range doesn't overlap *this. That means we > need to avoid relocating the existing elements until after copying from > the range. This m

[PATCH] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-22 Thread Jonathan Wakely
Unlike insert_range and assign_range, the append_range function does not have a precondition that the range doesn't overlap *this. That means we need to avoid relocating the existing elements until after copying from the range. This means I need to revert r15-8488-g3e1d760bf49d0e which made the fro