diff options
author | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-08 20:57:57 +0000 |
---|---|---|
committer | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-08 20:57:57 +0000 |
commit | de7466cfbe7bfd81845e88fde48f0b2d1216edb0 (patch) | |
tree | f55b55ed07f3d73ecc9083e0584eae03f77c1141 /libstdc++-v3/include/bits | |
parent | 8a08427dcaa7a3a679a4ac0a832f2b8beacefac4 (diff) | |
download | ppe42-gcc-de7466cfbe7bfd81845e88fde48f0b2d1216edb0.tar.gz ppe42-gcc-de7466cfbe7bfd81845e88fde48f0b2d1216edb0.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206444 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r-- | libstdc++-v3/include/bits/stl_vector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 28bdb6bb170..3638a8c07ef 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -1433,7 +1433,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void _M_move_assign(vector&& __x, std::true_type) noexcept { - const vector __tmp(std::move(*this)); + const vector __tmp(std::move(*this), get_allocator()); this->_M_impl._M_swap_data(__x._M_impl); if (_Alloc_traits::_S_propagate_on_move_assign()) std::__alloc_on_move(_M_get_Tp_allocator(), |