[v3 PATCH] PR libstdc++/78389
Ville Voutilainen
ville.voutilainen@gmail.com
Sun Jan 15 17:22:00 GMT 2017
On 15 January 2017 at 19:07, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> On 15 January 2017 at 19:01, Ville Voutilainen
> <ville.voutilainen@gmail.com> wrote:
>> On 15 January 2017 at 18:42, Tim Song <t.canens.cpp@gmail.com> wrote:
>>> On rereading the patch today, the size calculation for merge() appears
>>> to be backwards. [__first2, __last2) consists of the nodes not
>>> transferred into *this, so the new size of __x should be __dist while
>>> this->size() should be incremented by (__orig_size - __dist).
>>
>> Ah, yes, I'm an idiot. Fixing...
>
> 2017-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
>
> PR libstdc++/78389
> Fix backwards size adjustments.
> * include/bits/list.tcc (merge(list&&)):
> Fix backwards size adjustments.
> (merge(list&&, _StrictWeakOrdering)): Likewise.
> * testsuite/23_containers/list/operations/78389.cc: Add
> better test for the sizes.
Hmm, and yeah, your test uses a different throw-after number, so I
should change the tests to do the same. :)
More information about the Gcc-patches
mailing list