[patch] Simplify non-inline function definitions for std::unordered_xxx containers
Jonathan Wakely
jwakely@redhat.com
Thu Dec 4 11:39:00 GMT 2014
On 03/12/14 23:32 +0100, François Dumont wrote:
>On 03/12/2014 16:59, Jonathan Wakely wrote:
>>François (or anyone else), do you see any problem with this change?
>>
>>It makes the code shorter and I think is much easier to read, it also
>>reduces the memory total shown by -ftime-report.
>>
>No, no problem. Interesting to see what benefit we can have when
>reducing number of template parameters. I will try to recall it in the
>future.
We could remove the _Value parameter from every class template that
also takes _Alloc, because we can get it back from _Alloc::value_type
(assuming we consistently rebind the allocator to the value_type
before instantiating _Hashtable, which we don't currently do).
I have a patch coming soon for PR57272 that might include a change
like that, because I already need to replace _Value with
allocator_traits<_Alloc>::pointer everywhere.
More information about the Libstdc++
mailing list