Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2024-05-22 20:16:28


Hi,

>> C) Swap is similar to a double move assignment.
>
> The interesting situation is when one vector uses a dynamic buffer and the other one the internal buffer.
> Currently swap allocates also a dynamic buffer for the vector with the internal buffer.

Thanks for pointing this out. If the memory from the vector using the
dynamic buffer can be transferred (e.g. equal allocators or
propagate_on_container_swap is true), then we should avoid a new
allocation transferring elements to the internal buffer. I've updated
the issue:

https://github.com/boostorg/container/issues/279

Best,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk