Re: unordered containers: reuse nodes on assignment

2013-07-05 Thread François Dumont
Patch applied. I also found the number of template parameters painful. Isolating a part of the _Hashtable in a base class is a good idea and seems to be the solution indeed, I will have a try. François On 07/05/2013 12:28 AM, Jonathan Wakely wrote: On 4 July 2013 21:54, François Dumont wro

Re: unordered containers: reuse nodes on assignment

2013-07-04 Thread Jonathan Wakely
On 4 July 2013 21:54, François Dumont wrote: > > And about the patch itself, is it ok ? Yes, that latest patch is OK, thanks. It's made me think about the design a bit more though ... I've been a little uncomfortable for some time with the number of template parameters that are needed everywhere

Re: unordered containers: reuse nodes on assignment

2013-07-04 Thread François Dumont
On 07/01/2013 11:35 PM, Paolo Carlini wrote: On 07/01/2013 09:35 PM, François Dumont wrote: This is it indeed, I am surprised this problem is so old, a Standard issue perhaps ? If not I might add it to my todo list. Yesterday I had a look and I think it's just a bug, I found in Bugzilla a dupli

Re: unordered containers: reuse nodes on assignment

2013-07-01 Thread Paolo Carlini
On 07/01/2013 09:35 PM, François Dumont wrote: This is it indeed, I am surprised this problem is so old, a Standard issue perhaps ? If not I might add it to my todo list. Yesterday I had a look and I think it's just a bug, I found in Bugzilla a duplicate too, and another resolved Jon some time a

Re: unordered containers: reuse nodes on assignment

2013-07-01 Thread François Dumont
This is it indeed, I am surprised this problem is so old, a Standard issue perhaps ? If not I might add it to my todo list. François On 06/30/2013 09:43 PM, Paolo Carlini wrote: .. looks like PR39269, but please double check. Paolo.

Re: unordered containers: reuse nodes on assignment

2013-06-30 Thread Paolo Carlini
.. looks like PR39269, but please double check. Paolo.

Re: unordered containers: reuse nodes on assignment

2013-06-30 Thread Paolo Carlini
Hi, > Note that the friend declaration for _ReuseOrAllocNode used to be >wrong because I had left a template parameter on the friend declaration > >that I finally removed on the definition. But gcc didn't complained and > >use it as a valid friend declaration, should it be reported as a gcc

unordered containers: reuse nodes on assignment

2013-06-30 Thread François Dumont
Hi Here is a patch to reuse nodes on assignment. I took the time to make _ReuseOrAllocNode more flexible in order to remove _MoveReuseOrAllocNode and to use it for the insertion. Note that the friend declaration for _ReuseOrAllocNode used to be wrong because I had left a template par