
11 Aug
2011
11 Aug
'11
2:07 p.m.
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. I think it would be a useful addition in the current Proto without re-writing all of it though. I suspect however that if you don't rely on the default operator overloads and call make_expr yourself, it might work.
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?