unordered set design modification

François Dumont
Tue Oct 23 19:32:00 GMT 2012

On 10/22/2012 10:33 PM, Jonathan Wakely wrote:
> On 22 October 2012 20:59, François Dumont wrote:
>> Attached patch applied.
>> 2012-10-22  François Dumont  <>
>>      * include/bits/unordered_set.h (unordered_set<>): Prefer
>>      aggregation to inheritance with _Hashtable.
>>      (unordered_multiset<>): Likewise.
>>      * include/debug/unordered_set (operator==): Adapt.
>>      * include/profile/unordered_set (operator==): Adapt.
> +      //@{
> Do these comments work correctly?
> I think it needs to be ///@{ for Doxygen to recognise it.
I know only a little about Doxygen and only use copy/paste like you 
already noticed to try to respect its grammar.
>> I will now take care of unordered_map and unordered_multimap.
> Thanks.
> It occurs to me now that the copy and move operations could be
> defaulted, since all they do is forward to the member, which is both
> copyable and movable.
     I use default at the first place but then preferred to make 
implementation explicit, not yet accustom to default keyword perhaps. If 
using default is preferred then ok, I will in next patch. Does it really 
work for move operations ? If I write it like that:

unordered_set(unordered_set&&) = default;

or even if I write it like that:

unordered_set(unordered_set&& __x) = default;

that is to say with a named parameter.


More information about the Libstdc++ mailing list