Status of std::deque improvements

Jonathan Wakely jwakely@redhat.com
Tue Aug 21 08:33:00 GMT 2018


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.




More information about the Libstdc++ mailing list