This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Simplify non-inline function definitions for std::unordered_xxx containers
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 4 Dec 2014 11:39:43 +0000
- Subject: Re: [patch] Simplify non-inline function definitions for std::unordered_xxx containers
- Authentication-results: sourceware.org; auth=none
- References: <20141203120018 dot GL3134 at redhat dot com> <20141203155949 dot GO3134 at redhat dot com> <547F8F8F dot 9060506 at gmail dot com>
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.