From c5b2614754a2c8fc3e03048d56fe328446aab972 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 25 Sep 2014 13:14:15 +0100 Subject: [PATCH] * include/bits/vector.tcc (vector::_M_fill_assign): Use _M_swap_data. From-SVN: r215596 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/bits/vector.tcc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 172fc09f740..4bbb952f6b5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2014-09-25 Jonathan Wakely + + * include/bits/vector.tcc (vector::_M_fill_assign): Use _M_swap_data. + 2014-09-25 Jonathan Wakely * testsuite/27_io/basic_ios/conv/bool_neg.cc: New. diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index 5c3dfae9381..4eacec3f516 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (__n > capacity()) { vector __tmp(__n, __val, _M_get_Tp_allocator()); - __tmp.swap(*this); + __tmp._M_impl._M_swap_data(this->_M_impl); } else if (__n > size()) { -- 2.30.2