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] Exploit move semantics in std::accumulate.


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


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