]> git.ipfire.org Git - thirdparty/gcc.git/commit
stl_vector.h (std::vector<>::_M_move_assign): Pass *this allocator instance when...
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 8 Jan 2014 20:57:57 +0000 (20:57 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 8 Jan 2014 20:57:57 +0000 (20:57 +0000)
commitace295afeb0a126d960339d0e04e3b8b26e96670
treef55b55ed07f3d73ecc9083e0584eae03f77c1141
parent6170ceff5a6e3ff8022647d43935e99205ef7e5a
stl_vector.h (std::vector<>::_M_move_assign): Pass *this allocator instance when building temporary vector instance so that...

2014-01-08  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_vector.h (std::vector<>::_M_move_assign): Pass
*this allocator instance when building temporary vector instance
so that *this allocator does not get moved.
* include/debug/safe_base.h
(_Safe_sequence_base(_Safe_sequence_base&&)): New.
* include/debug/vector (__gnu_debug::vector<>(vector&&)): Use new
move constructor from _Safe_sequence_base.
(__gnu_debug::vector<>(vector&&, const allocator_type&)): Swap
safe iterators if the instance is moved.
(__gnu_debug::vector<>::operator=(vector&&)): Likewise.
* testsuite/23_containers/vector/allocator/move.cc (test01): Add
check on a vector iterator.
* testsuite/23_containers/vector/allocator/move_assign.cc
(test02): Likewise.
(test03): New, test with a non-propagating allocator.
* testsuite/23_containers/vector/debug/move_assign_neg.cc: New.

From-SVN: r206444
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/debug/safe_base.h
libstdc++-v3/include/debug/vector
libstdc++-v3/testsuite/23_containers/vector/allocator/move.cc
libstdc++-v3/testsuite/23_containers/vector/allocator/move_assign.cc
libstdc++-v3/testsuite/23_containers/vector/debug/move_assign_neg.cc [new file with mode: 0644]