diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-12-22 23:21:14 +0000 |
---|---|---|
committer | Paolo Carlini <pcarlini@suse.de> | 2005-12-22 23:21:14 +0000 |
commit | 404e5558d7cc1bd8e5d7c5acf780cd939e2e2021 (patch) | |
tree | e0834722d300de1ef9f388ccfa995552296b7efe | |
parent | d7bd99e82e1bdc86a5d2297fc154e9c85b78d9fc (diff) |
2005-12-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algobase.h (fill(const _Deque_iterator&,
const _Deque_iterator&, const _Tp&)): Deal, correctly, only
with iterators (leave const_iterators alone).
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/libstdcxx_so_7-branch@108987 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog.libstdcxx_so_7-branch | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algobase.h | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog.libstdcxx_so_7-branch b/libstdc++-v3/ChangeLog.libstdcxx_so_7-branch index 19a229f5e72..45447e1891f 100644 --- a/libstdc++-v3/ChangeLog.libstdcxx_so_7-branch +++ b/libstdc++-v3/ChangeLog.libstdcxx_so_7-branch @@ -1,3 +1,9 @@ +2005-12-22 Paolo Carlini <pcarlini@suse.de> + + * include/bits/stl_algobase.h (fill(const _Deque_iterator&, + const _Deque_iterator&, const _Tp&)): Deal, correctly, only + with iterators (leave const_iterators alone). + 2005-12-20 Paolo Carlini <pcarlini@suse.de> Implement Option 3 of DR 431 for all the containers. diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 07b6ae688a5..81be92a2467 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -691,12 +691,14 @@ namespace std template<typename _Tp, typename _Ref, typename _Ptr> struct _Deque_iterator; - template<typename _Tp, typename _Ref, typename _Ptr> + // Overload for deque::iterators, exploiting the "segmented-iterator + // optimization". NB: leave const_iterators alone! + template<typename _Tp> void - fill(const _Deque_iterator<_Tp, _Ref, _Ptr>& __first, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __last, const _Tp& __value) + fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, + const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) { - typedef typename _Deque_iterator<_Tp, _Ref, _Ptr>::_Self _Self; + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; for (typename _Self::_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) |