|
Boost : |
From: Maurizio Vitale (mav_at_[hidden])
Date: 2007-05-08 02:14:30
Eric Niebler <eric_at_[hidden]> writes:
> BOOST_PROTO_TYPEOF is internal only. I'll rename it, and #undef it at
> the end of context.hpp.
Ok. Thanks.
> Nodes in proto's expression tree are held by reference, so that building
> an expression tree requires no copying. But some nodes are temporaries.
> deep_copy() forces all nodes to be held by value, which is necessary if
> you're storing them in a local variable like this.
Actually, I'm trying to do the opposite: I have expressions used to
represent the way to do quantization and manage overflow which have
noting to refer to when they're created, so they're made of operators
and terminals with no data in. The type is all that is needed for
evaluating them, and the evaluation context will know where to grab
the data from. Although evaluation is driven by the type, it is a
run-time evaluation.
I hope to be able to use evaluation contexts for this, if it doesn't
work either transforms or an homebrewed solutions (but still using
proto for describing the expression).
Since you mentioned by-ref/by-value, there's something I meant to ask:
proto stores by ref: wouldn't be possible to let the terminal decide?
When data is a simple builtin, by-value would be more efficient.
I haven't checked the implementation, so I'm not sure the above makes
sense.
Best regards,
Maurizio
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk