aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2005-11-02 10:27:54 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2005-11-02 10:27:54 +0000
commit3d8aa000c34b094c66f1be45c6083d9ee3069a21 (patch)
tree9bee4cb52377e6c350311f236c1dfe3e5ac58033 /libstdc++-v3
parentced61f82af24dd2e5d4c8cdaf8b8329fe41e59d0 (diff)
downloadgcc-3d8aa000c34b094c66f1be45c6083d9ee3069a21.zip
gcc-3d8aa000c34b094c66f1be45c6083d9ee3069a21.tar.gz
gcc-3d8aa000c34b094c66f1be45c6083d9ee3069a21.tar.bz2
[multiple changes]
2005-11-02 Thomas Kho <tkho@ucla.edu> PR libstdc++/23425 * include/bits/stl_vector.h (vector<>::clear): Open code in terms of _Destroy. 2005-11-02 Paolo Carlini <pcarlini@suse.de> * include/bits/vector.tcc (vector<>::_M_fill_assign): Qualify fill_n. From-SVN: r106379
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog10
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h6
-rw-r--r--libstdc++-v3/include/bits/vector.tcc2
3 files changed, 16 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8b9d310..0a779b6 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-02 Thomas Kho <tkho@ucla.edu>
+
+ PR libstdc++/23425
+ * include/bits/stl_vector.h (vector<>::clear): Open code
+ in terms of _Destroy.
+
+2005-11-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/vector.tcc (vector<>::_M_fill_assign): Qualify fill_n.
+
2005-11-01 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/24595
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 94acec2..1fc59dd 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -742,7 +742,11 @@ namespace _GLIBCXX_STD
*/
void
clear()
- { erase(begin(), end()); }
+ {
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = this->_M_impl._M_start;
+ }
protected:
/**
diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc
index 9e0eeb9..3a9b66e 100644
--- a/libstdc++-v3/include/bits/vector.tcc
+++ b/libstdc++-v3/include/bits/vector.tcc
@@ -184,7 +184,7 @@ namespace _GLIBCXX_STD
this->_M_impl._M_finish += __n - size();
}
else
- erase(fill_n(begin(), __n, __val), end());
+ erase(std::fill_n(begin(), __n, __val), end());
}
template<typename _Tp, typename _Alloc>