This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change to search_n


Hi Jonathan, hi list,

Apart from being a parameter, __first can be also used
as a variable. Hence, In Jeffs implementation __first
is being frequently advanced. In most cases, Jeff is
carefully testing the (--last - --first) distance
before advancing, so there not a real problem here, I
was speaking theoretically. (There is an actual bug
though, in the first advancement of __first, but we
have covered that in previous mails of this thread.)

Best Regards,
Jim Xochellis

> > Its mainly the expressions like (__last - __first
> >
> > __count) that are producing these warnings. These
> > expression will fail to work as expected in case
> > __first > __last.
> 
> Wouldn't that be an invalid range, which breaks the
> preconditions of
> search_n?


____________________________________________________________
Do You Yahoo!?
Αποκτήστε τη δωρεάν @yahoo.gr διεύθυνση σας στο http://www.otenet.gr


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