Limit template parameters in hashtable

François Dumont frs.dumont@gmail.com
Mon Jul 15 20:36:00 GMT 2013


Hi

     Here is a patch proposal to limit number of template parameters in 
recently introduced _ReuseOrAllocNode and _AllocNode types. I hope it is 
what you had in mind Jonathan. I have isolated most of allocation code 
into a new _Hashtable_alloc class and inherit from it in _Hashtable. It 
greatly reduce the number of template parameters for a number of methods 
that used to be in _Hashtable.

     The drawback is of course that it introduces a binary breaking 
change, is it fine ?

     Tested under Linux x86_64.

2013-07-16  François Dumont  <fdumont@gcc.gnu.org>

     * include/bits/hashtable_policy.h (_Hashtable_alloc): New.
     (_ReuseOrAllocNode, _AllocNode): Adapt.
     * include/bits/hashtable.h (_Hashtable): Inherit from
     _Hashtable_alloc.
     * 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.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable.patch
Type: text/x-patch
Size: 35334 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20130715/905b59e3/attachment.bin>


More information about the Libstdc++ mailing list