Boost logo

Boost :

Subject: Re: [boost] ASIO into the standard (was: Re: C++ committee meeting report)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-07-05 16:00:41


On 4 Jul 2014 at 15:44, Jonathan Wakely wrote:

> On 4 July 2014 12:44, Niall Douglas wrote:
> > There are lots of things going on here. STL allocators were always
> > half baked because they were never finished - John Lakos is but one
> > of many who took them to all sorts of interesting new places, indeed
> > Stepanov's original design had enormous potential. Unfortunately,
> > we've ended up stuck with these half finished things, and now they
> > are creating slow path performance with std::vector<std::vector<T>>
> > because STL containers can't have a noexcept move constructor due to
> > allocators!
>
> That's not true, the move constructor always propagates the allocator
> so doesn't need to re-allocate. The reason for it not being noexcept
> is not because of allocators, and at the last meeting we agreed that
> vector and string should have noexcept move constructors, always.
>
> Move assignment might need to reallocate for non-equal allocators, so
> that can't always be noexcept (but the implementation can add a
> conditional noexcept using the propagate_on_container_move_assignment
> trait, if your vendor doesn't do that complain to them :-)

I am grateful for the clarification, but I think my original
statement was correct yes? STL containers don't have a noexcept move
constructor in C++ 11 due to allocators?

I am aware it's being fixed. There was a presentation and meeting at
C++ Now about it.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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