This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[v3] libstdc++/2964



simple fix

2001-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2964
	* include/bits/stl_iterator_base_funcs.h (__advance): Fix.



Index: include/bits/stl_iterator_base_funcs.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_iterator_base_funcs.h,v
retrieving revision 1.2
diff -c -p -r1.2 stl_iterator_base_funcs.h
*** stl_iterator_base_funcs.h	2001/04/13 09:03:18	1.2
--- stl_iterator_base_funcs.h	2001/04/30 17:40:55
*************** inline void __advance(_BidirectionalIter
*** 120,126 ****
  {
    // concept requirements
  __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>);
!   if (__n >= 0)
      while (__n--) ++__i;
    else
      while (__n++) --__i;
--- 120,126 ----
  {
    // concept requirements
  __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>);
!   if (__n > 0)
      while (__n--) ++__i;
    else
      while (__n++) --__i;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]