Status of std::deque improvements

François Dumont frs.dumont@gmail.com
Tue Aug 21 20:22:00 GMT 2018


On 21/08/2018 10:33, Jonathan Wakely wrote:
> On 20/08/18 22:54 +0200, François Dumont wrote:
>> Note that on my side I had also work on it. At the beginning it was 
>> more an attempt to default constructors like I did for other 
>> containers but eventually I had to do a little like you did.
>>
>> Here is the patch, I'll have a look to yours to see differences and 
>> surely pick up some good ideas from yours.
>
> The problem is that there is existing code already compiled using our
> std::deque which assumes that the map pointer is never null. You can't
> change that invariant now. If a std::deque is constructed in one
> translation unit (which leaves the pointers null) and passed to a
> different translation unit which assumes they are never null, it won't
> perform the checks, and will crash.
>
>
>
Sorry, in fact the patch was mostly to make the move constructor noexcept.

But as for your patches it is only possible by breaking the abi so it 
also enable this only when versioned namespace is activated.

This is why I added a dg-require-versioned-namespace for the test 
checking that move constructor is noexcept.



More information about the Libstdc++ mailing list