[PATCH] Optimize inserting value_type into std::vector
Jonathan Wakely
jwakely@redhat.com
Thu Jun 16 12:43:00 GMT 2016
On 15/06/16 11:15 +0100, Jonathan Wakely wrote:
> * include/bits/stl_vector.h (vector::_S_insert_aux_assign): Define
> new overloaded functions.
> * include/bits/vector.tcc (vector::_M_insert_aux): Use new functions
> to avoid creating a redundant temporary.
> * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc: New
> test.
>
>Tested x86_64-linux.
Committed to trunk.
More information about the Gcc-patches
mailing list