On Mon, 24 Mar 2025 at 14:18, Patrick Palka wrote:
>
> On Mon, 24 Mar 2025, 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 el
On Mon, 24 Mar 2025 at 12:40, Tomasz Kaminski wrote:
> As a note reserving for empty vector:
> + // If there are no existing elements it's safe to allocate now.
> + if (__sz == 0)
> + reserve(__n);
> Will invalidate v.begin(), v.end(), so if the incoming range
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
On Mon, 24 Mar 2025, 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 means I need
On Mon, Mar 24, 2025 at 1:08 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