This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: insert move iterator patch

On 04/25/2013 11:00 PM, Paolo Carlini wrote:

On 04/25/2013 10:11 PM, François Dumont wrote:

Here is a patch to use move semantic when inserting a move_iterator range into the unordered containers.

2013-04-25  François Dumont  <>

    * include/bits/hashtable_policy.h
    (_Insert_base<>::insert<_It>(_It, _It)): Enable move semantic.
    * testsuite/23_containers/unordered_set/insert/ 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.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]