unordered map design modification

François Dumont
Sat Oct 27 12:27:00 GMT 2012

On 10/26/2012 10:41 AM, Paolo Carlini wrote:
> On 10/25/2012 10:15 PM, François Dumont wrote:
>> Here is the patch to apply the same modification applied to 
>> unordered_set and unordered_multiset. It also use default 
>> implementation for unordered_set/unordered_multiset copy/move 
>> constructor/assignment operators.
> Looks good to me, thanks! Before committing, please double check the 
> various comments vs the various observations Jon sent over the last time.
> Thanks again,
> Paolo.
Attached patch applied.

2012-10-27  François Dumont  <>

     * include/bits/unordered_map.h (unordered_map<>): Prefer
     aggreagation to inheritance with _Hashtable.
     (unordered_multimap<>): Likewise.
     * include/bits/unordered_set.h
     (unordered_set<>(const unordered_set&)):  Use default
     (unordered_set<>(unordered_set&&)): Likewise.
     (unordered_set<>::operator=(const unordered_set&)): Likewise.
     (unordered_set<>::operator=(unordered_set&&)): Likewise.
     (unordered_multiset<>(const unordered_multiset&)): Likewise.
     (unordered_multiset<>(unordered_multiset&&)): Likewise.
     (unordered_multiset<>::operator=(const unordered_multiset&)):
(unordered_multiset<>::operator=(unordered_multiset&&)): Likewise.
     * include/debug/unordered_map (operator==): Adapt.
     * include/profile/unordered_map (operator==): Adapt.

I think I did consider all Jonathan remarks which was mostly to use as 
much as possible default implementations so benefit from noexcept 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: unordered_containers.patch
Type: text/x-patch
Size: 52740 bytes
Desc: not available
URL: <>

More information about the Libstdc++ mailing list