Removing the "- 1"? (was: Re: [Patch] Fix libstdc++/11400)

Paolo Carlini pcarlini@unitus.it
Mon Sep 29 21:10:00 GMT 2003


Martin Sebor wrote:

> A safer fix would be to first convert __count to some integer type
> and then decrement the copy:
>
>     typename iterator_traits<_ForwardIterator>::difference_type
>         __n = __count;
>     --__n;

Hi again.

I think the --__n can be spared if we only tweak two comparisons
below in a straightforward way.

What do you think?

Paolo.

//////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_search_n_tweak
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030929/51d6b192/attachment.ksh>


More information about the Libstdc++ mailing list