From 20c2ffd0f614b26b0d75edc228bc8a99df9932ec Mon Sep 17 00:00:00 2001 From: bkoz Date: Mon, 30 Apr 2001 17:48:41 +0000 Subject: [PATCH] 2001-04-30 Benjamin Kosnik libstdc++/2964 * include/bits/stl_iterator_base_funcs.h (__advance): Fix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41690 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 4 ++-- 1 file 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 -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; -- 2.7.4