insert move iterator patch

François Dumont frs.dumont@gmail.com
Fri Apr 26 21:14:00 GMT 2013


On 04/25/2013 11:00 PM, Paolo Carlini wrote:
> Hi,
>
> On 04/25/2013 10:11 PM, François Dumont wrote:
>> Hi
>>
>>     Here is a patch to use move semantic when inserting a 
>> move_iterator range into the unordered containers.
>>
>> 2013-04-25  François Dumont  <fdumont@gcc.gnu.org>
>>
>>     * include/bits/hashtable_policy.h
>>     (_Insert_base<>::insert<_It>(_It, _It)): Enable move semantic.
>>     * testsuite/23_containers/unordered_set/insert/move_range.cc: New.
>>
>>     Tested under Linux x86_64.
>>
>>     Ok to commit ? Maybe in 4.8 branch too ?
> Looks good, for the branch too - the problem is just that the overload 
> at issue belongs to _Insert_base thus it can't just forward, it 
> doesn't see the overloads taking rvalues. Can we do a quick audit of 
> the other containers and see which are already Ok, which in case can 
> be fixed with moderate work?
>
> Nit: let's use -std=gnu++11. And semantics, not semantic.
>
> Paolo.
>
Applied on trunk for the moment, with -std=c++11, sorry, I missed this 
remark. And why not using a standard option if the code is perfectly 
Standard.

I check other containers and they are ok.

François



More information about the Libstdc++ mailing list