Eric Niebler <e...@...> writes: > On 11/18/2010 6:09 AM, Thomas Heller wrote: > > Here goes the renumbering example: > > http://codepad.org/K0TZamPb <snip> > Unfortunately, this doesn't actually solve the reevaluation problem ... > it just hides it.
Yes, exactly. > If "_a" gets replaced eagerly everywhere with > "Renumber(_, second(proto::_state))", then that transform will actually > get run every time. What I want is a way to evaluate the transform, > store the result in a temporary, and have "_a" refer to that temporary. Yes, I thought of doing this ... but could not find a solution. The question is, do we really need this behaviour? Is replacement not enough? Could you make up a usecase? I can not think of one ... Regarding that counting example ... it can be solved by this pair hack. > It's REALLY hard. The let context needs to be bundled with the Expr, > State, or Data parameters somehow, but in a way that's transparent. I > don't actually know if it's possible. Very hard ... yeah. I am thinking that we can maybe save these variables in the transform? _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto