diff options
author | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2001-04-30 17:48:41 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2001-04-30 17:48:41 +0000 |
commit | 9d377fd443d942e5008fce394285b8d9e2e5f385 (patch) | |
tree | ff9810555b80e0d627508f65b4466c59c929a969 /libstdc++-v3 | |
parent | 215e98639b0b0f12c3b9cc339ea856d842ebe22e (diff) | |
download | gcc-9d377fd443d942e5008fce394285b8d9e2e5f385.zip gcc-9d377fd443d942e5008fce394285b8d9e2e5f385.tar.gz gcc-9d377fd443d942e5008fce394285b8d9e2e5f385.tar.bz2 |
stl_iterator_base_funcs.h (__advance): Fix.
2001-04-30 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/2964
* include/bits/stl_iterator_base_funcs.h (__advance): Fix.
From-SVN: r41690
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index 5288eda..8520e9d 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h @@ -107,7 +107,7 @@ distance(_InputIterator __first, _InputIterator __last) } template <class _InputIter, class _Distance> -inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag) +inline void __advance_InputIter& __i, _Distance __n, input_iterator_tag) { // concept requirements __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); @@ -120,7 +120,7 @@ inline void __advance(_BidirectionalIterator& __i, _Distance __n, { // concept requirements __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>); - if (__n >= 0) + if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; |