[patch] libstdc++/66055 add missing constructors to unordered containers

François Dumont frs.dumont@gmail.com
Sat May 16 10:36:00 GMT 2015


On 14/05/2015 15:47, Jonathan Wakely wrote:
> Reported by Nathan and fixed by his patch. I added the tests.
>
> Tested powerpc64le-linux, committed to trunk. This should be
> backported too.

While backporting to debug and profile mode I noticed that those 
constructors were not the only missing ones. So here is a patch to 
complete them with debug and profile modes.

Moreover this patch:
- Remove explicit keyword on one of the unordered_map constructor, 
surely the result of a copy/paste
- Use constructor delegation as proposed by the Standard
- Move code to follow Standard description order, it is easier this way 
to check that nothing is missing.

     * include/bits/unordered_map.h (unordered_map, unordered_multimap): Add
     missing constructors.
     * include/bits/unordered_set.h (unordered_set, unordered_multiset):
     Likewise.
     * include/debug/unordered_map (unordered_map, unordered_multimap): Add
     missing constructors.
     * include/debug/unordered_set (unordered_set, unordered_multiset):
     Likewise.
     * include/profile/unordered_map (unordered_map, 
unordered_multimap): Add
     missing constructors.
     * include/profile/unordered_set (unordered_set, unordered_multiset):
     Likewise.
     * testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
     invocations.
     * testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
     * testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
     * testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.

Ok to commit ?

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unordered.patch
Type: text/x-patch
Size: 23343 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150516/45763c7c/attachment.bin>


More information about the Gcc-patches mailing list