This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Change to search_n
- From: Dimitris Xochellis <jimxoch at yahoo dot gr>
- To: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- Cc: Chris Jefferson <caj at cs dot york dot ac dot uk>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 1 Mar 2005 05:57:34 +0000 (GMT)
- Subject: 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