[PATCH] Exploit move semantics in std::accumulate.
Christopher Jefferson
chris@bubblescope.net
Sat Jan 8 19:44:00 GMT 2011
On 8 Jan 2011, at 18:31, Marc Glisse wrote:
> On Sat, 8 Jan 2011, Christopher Jefferson wrote:
>
>> Your patch is a really nice idea. I'm not 100% sure it is allowed by the C++0x standard (although, I can't imagine any valid code which would possibly break it).
>
> It has a strong smell of x=move(x); about it...
I'm not too worried about that (although perhaps I should).
My worry is that the standard explicitally says it uses " acc = acc + x " and " acc = binary_op(acc, x) ".
Chris
More information about the Libstdc++
mailing list