This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] libstdc++/36338
- From: "Chris Jefferson" <chris at bubblescope dot net>
- To: "Paolo Carlini" <paolo dot carlini at oracle dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 30 May 2008 00:38:56 +0100
- Subject: Re: [Patch] libstdc++/36338
- References: <483EB744.601@oracle.com>
2008/5/29 Paolo Carlini <paolo.carlini@oracle.com>:
> Hi,
>
> this is the patch I finished testing in debug-mode too on x86_64-linux.
> Seems rather straightforward to me, but It would be nice if Chris could
> double check it (sorry, but I'm still scared by some trickeries with
> iterators), I'll wait a few hours before committing, mainline only, in any
> case.
I might be going mad but:
> while (__last - __first > 1)
> - std::pop_heap(__first, _RandomAccessIterator(__last--));
> + {
> + --__last;
> + std::__pop_heap(__first, __last, __last);
> + }
> }
Seeing as the original was a post-increment, shouldn't the --__last come after?