Re: [PATCH] libstdc++: Simplify _Hashtable merge functions

2024-11-14 Thread Jonathan Wakely
On Thu, 14 Nov 2024, 06:06 François Dumont, wrote: > Sounds like a very good idea. > > Moreover friend declaration could be limited to another _Hashtable<> > type with same _Key, _Value and _Alloc types to be compatible. > C++ doesn't support friends with some template arguments fixed, you eithe

Re: [PATCH] libstdc++: Simplify _Hashtable merge functions

2024-11-13 Thread François Dumont
Sounds like a very good idea. Moreover friend declaration could be limited to another _Hashtable<> type with same _Key, _Value and _Alloc types to be compatible. On 08/11/2024 11:33, Jonathan Wakely wrote: On Thu, 7 Nov 2024 at 22:18, Jonathan Wakely wrote: I realised that _M_merge_unique an

Re: [PATCH] libstdc++: Simplify _Hashtable merge functions

2024-11-08 Thread Jonathan Wakely
On Thu, 7 Nov 2024 at 22:18, Jonathan Wakely wrote: > > I realised that _M_merge_unique and _M_merge_multi call extract(iter) > which then has to call _M_get_previous_node to iterate through the > bucket to find the node before the one iter points to. Since the merge > function is already iterating