stl_vector.h (push_back(const value_type&)): Forward to _M_realloc_insert.
authorFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 11 Jul 2016 20:17:56 +0000 (20:17 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 11 Jul 2016 20:17:56 +0000 (20:17 +0000)
commit76225d2ca77038233f5af5903ab0bd10aa78e611
tree2cbe770d616acb22f925cbe299cd8edd0f6e5c08
parent4368a420fb0679a0ef78fd0806dbdf7917cd948d
stl_vector.h (push_back(const value_type&)): Forward to _M_realloc_insert.

2016-07-11  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_vector.h (push_back(const value_type&)): Forward
to _M_realloc_insert.
(insert(const_iterator, value_type&&)): Forward to _M_insert_rval.
(_M_realloc_insert): Declare new function.
(_M_emplace_back_aux): Remove definition.
* include/bits/vector.tcc (emplace_back(_Args...)):
Use _M_realloc_insert.
(insert(const_iterator, const value_type&)): Likewise.
(_M_insert_rval, _M_emplace_aux): Likewise.
(_M_emplace_back_aux): Remove declaration.
(_M_realloc_insert): Define.
* testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
Adjust expected results for emplacing an lvalue with reallocation.

From-SVN: r238226
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc