Re: [patch] libstdc++/61143 make unordered containers usable after move

2014-05-20 Thread François Dumont
On 20/05/2014 21:36, Jonathan Wakely wrote: OK. My sketch above avoided calling _M_moved_from() more than once per object, but the compiler should be able to optimise your version to avoid multiple calls anyway. Here is the new patch limited to what I really want to commit this time. Great.

Re: [patch] libstdc++/61143 make unordered containers usable after move

2014-05-20 Thread Jonathan Wakely
On 19/05/14 22:27 +0200, François Dumont wrote: On 15/05/2014 22:52, Jonathan Wakely wrote: Does this get initialized in the constructors? Would it make sense to give it an initializer? __bucket_type_M_single_bucket = nullptr; This bucket is replacing those normally allocated a

Re: [patch] libstdc++/61143 make unordered containers usable after move

2014-05-19 Thread François Dumont
On 15/05/2014 22:52, Jonathan Wakely wrote: On 15/05/14 22:20 +0200, François Dumont wrote: Hi Here is a proposal to fix PR 61143. As explained in the PR I finally prefer to leave the container in a valid state that is to say with a non zero number of bucket, that is to say 1, after a move

Re: [patch] libstdc++/61143 make unordered containers usable after move

2014-05-15 Thread Jonathan Wakely
On 15/05/14 22:20 +0200, François Dumont wrote: Hi Here is a proposal to fix PR 61143. As explained in the PR I finally prefer to leave the container in a valid state that is to say with a non zero number of bucket, that is to say 1, after a move. This bucket is stored directly in the cont

Re: [patch] libstdc++/61143 make unordered containers usable after move

2014-05-15 Thread Paolo Carlini
Hi, On 05/15/2014 10:20 PM, François Dumont wrote: Hi Here is a proposal to fix PR 61143. As explained in the PR I finally prefer to leave the container in a valid state that is to say with a non zero number of bucket, that is to say 1, after a move. This bucket is stored directly in the

[patch] libstdc++/61143 make unordered containers usable after move

2014-05-15 Thread François Dumont
Hi Here is a proposal to fix PR 61143. As explained in the PR I finally prefer to leave the container in a valid state that is to say with a non zero number of bucket, that is to say 1, after a move. This bucket is stored directly in the container so not allocated to leave the move operat