2001-04-30 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/2964
* include/bits/stl_iterator_base_funcs.h (__advance): Fix.
From-SVN: r41690
}
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>);
{
// concept requirements
__glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>);
- if (__n >= 0)
+ if (__n > 0)
while (__n--) ++__i;
else
while (__n++) --__i;