vector.tcc (vector<>::_M_insert_aux): In C++0x mode, avoid a memory leak if the first...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 2 Jun 2008 12:22:53 +0000 (12:22 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 2 Jun 2008 12:22:53 +0000 (12:22 +0000)
commitd2219f89bf67a263f17475e5f83759ce1261959f
treed22ca411651d2fa41a839a449106704b1732c335
parent690028435cafde915d313c19f320bccdf2c0c6c2
vector.tcc (vector<>::_M_insert_aux): In C++0x mode, avoid a memory leak if the first __uninitialized_move_a throws.

2008-06-02  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/vector.tcc (vector<>::_M_insert_aux): In C++0x mode,
avoid a memory leak if the first __uninitialized_move_a throws.
(vector<>::_M_fill_insert): Do not always copy to __x_copy, similarly
to _M_insert_aux.
* testsuite/23_containers/vector/modifiers/moveable.cc: Adjust.
* testsuite/23_containers/vector/resize/moveable.cc: Likewise.

From-SVN: r136277
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/testsuite/23_containers/vector/modifiers/moveable.cc
libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc