Re: [patch] std::vector::assign should not call std::vector::swap

2014-10-01 Thread Jonathan Wakely
On 25/09/14 13:14 +0100, Jonathan Wakely wrote: With C++11 allocator semantics the swap() member might also replace the allocator, which is only allowed in specific circumstances. Even though the worst that could happen is we replace the allocator with an equal one, we should avoid using swap an

[patch] std::vector::assign should not call std::vector::swap

2014-09-25 Thread Jonathan Wakely
With C++11 allocator semantics the swap() member might also replace the allocator, which is only allowed in specific circumstances. Even though the worst that could happen is we replace the allocator with an equal one, we should avoid using swap and use the internal _M_swap_data function instead.