This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Limit template parameters in hashtable


Is it ok for this one ?

Note that I had forgotten the pretty printer modification in this patch but I have fix it for the final one.

François


On 07/23/2013 09:23 PM, François Dumont wrote:
On 07/21/2013 07:55 PM, Jonathan Wakely wrote:
Ah OK. I like this change, I think it should produce smaller code when multiple hash tables are used in the same program.

Hi

Before you give the final validation I would like to propose this revisited version.

Now that we have a base class managing allocation we can also use it for EBO of the allocator instance. I was not happy with _M_before_begin base node being lost in _Hashtable_alloc while all other fields were declared in _Hashtable. Use of _Hashtable_ebo_helper will also avoid problem if the allocator type is final.

    * include/bits/hashtable_policy.h (_Hashtable_alloc): New.
    (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than
    _Hashtable.
    * include/bits/hashtable.h (_Hashtable): Inherit from
    _Hashtable_alloc and adapt.
    * testsuite/23_containers/unordered_set/
    not_default_constructible_hash_neg.cc: Adapt dg-error line number.
    * testsuite/23_containers/unordered_set/instantiation_neg.cc:
    Likewise.

Tested under Linux x86_64.

Ok to commit ?

François



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]