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: [Patch] libstdc++/36338


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?


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