insert move iterator patch
Paolo Carlini
paolo.carlini@oracle.com
Thu Apr 25 21:00:00 GMT 2013
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.
More information about the Libstdc++
mailing list