[patch] Fix PR52822 (stable_partition move-assigns object to itself) in trunk, 4.7, and 4.6

Paolo Carlini paolo.carlini@oracle.com
Thu Apr 5 06:12:00 GMT 2012


On 4/4/12 11:09 PM, Paolo Carlini wrote:
> Hi,
>> The attached patches fix http://gcc.gnu.org/PR52822, and have been
>> tested with `make check-c++` on linux-x86_64. The trunk patch applies
>> and tests cleanly on gcc-4_7-branch. The gcc-4_6-branch patch is
>> significantly simpler, as Paolo suggested on the bug.
> A few small issues.
>
> For the 4.6 version of the patch, you want to use std::__addressof, 
> instead of simply &, which may be overloaded.
And by the way what's wrong with just comparing the iterators?

Paolo.



More information about the Gcc-patches mailing list