This is the mail archive of the libstdc++@gcc.gnu.org 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: [PATCH] Optimize inserting value_type into std::vector


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.


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