[patch] libstdc++/61143 make unordered containers usable after move

François Dumont frs.dumont@gmail.com
Thu May 15 20:20:00 GMT 2014


Hi

     Here is a proposal to fix PR 61143. As explained in the PR I 
finally prefer to leave the container in a valid state that is to say 
with a non zero number of bucket, that is to say 1, after a move. This 
bucket is stored directly in the container so not allocated to leave the 
move operations noexcept qualified. With this evolution we could even 
make the default constructor noexcept but I don't think it has any interest.

2014-05-15  François Dumont  <fdumont@gcc.gnu.org>

     PR libstdc++/61143
     * include/bits/hashtable.h: Fix move semantic to leave hashtable in a
     usable state.
     * testsuite/23_containers/unordered_set/61143.cc: New.

     I run unordered containers test for the moment with no error. I 
will run the others before to commit.

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable.patch
Type: text/x-patch
Size: 16444 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20140515/27de7044/attachment.bin>


More information about the Libstdc++ mailing list