libstdc++ PR 57272 Fancy pointer support in Hashtable
François Dumont
frs.dumont@gmail.com
Sun Apr 19 17:31:56 GMT 2020
Here is my work in progress to use allocator pointer type. This type is
used both as the node pointer and as the buckets pointer.
Rather than adapting _Local_iterator_base like _Node_iterator_base I
prefer to just make it inherits from _Node_iterator_base. It simplifies
its implementation and avoids to provided dedicated comparison operators.
Now I wonder if I need to consider Phil Bouchard comment regarding how
node pointers are being passed, either by value or reference. I already
chose to pass them as rvalue references in some occasions and even
lvalue reference like in _M_bucket_index method. Do you think I need to
continue this way ? Maybe I should use some conditional type, if raw
pointer we pass by value and otherwise we pass by ref ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable_ext_ptr.patch
Type: text/x-patch
Size: 83210 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200419/4dde72b6/attachment-0001.bin>
More information about the Libstdc++
mailing list