Boost logo

Boost :

Subject: Re: [boost] [proto] RValue reference support?
From: Eric Niebler (eric_at_[hidden])
Date: 2011-08-11 12:31:15


On 8/11/2011 7:07 AM, Mathias Gaunard wrote:
> On 11/08/2011 14:34, John Maddock wrote:
>> Does proto have any support for rvalue references in terminals?
>
> No, unfortunately.
> I think Eric said that for C++0x, it would be nice to rewrite a lot of
> things to make them simpler and faster to compile.

That would be great.

> I think it would be a useful addition in the current Proto without
> re-writing all of it though.

I agree.

> I suspect however that if you don't rely on the default operator
> overloads and call make_expr yourself, it might work.

I don't think so. The make_expr overloads are also unaware of move
semantics.

>> I'm thinking that if you know that you're assigning an expression
>> involving an rvalue-reference as a terminal, then there are some
>> optimizations that can be performed that aren't otherwise possible.
>
> Do you have an example of a DSL where that would be useful?

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk