Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-03-12 06:23:02


> So you can say "fun + fun" and build a new node
> representing an addition. Or you can say "fun(fun)" to build a new node
> representing a function call. You could even say "(fun + fun)(fun, fun
> fun)". But that would be too much fun.

Is the following statement correct:

expr< tag::terminal, args0< placeholder_t >, 0 >::operator()(...args...)
returns an expression representation that during evaluation via
proto::eval() first evaluates its arguments and then delegates the result to
to placeholder_t::operator()( ... args... ).

In contrast to this all other operators (+, -, *, / etc.)
return an expression representation that during evaluation via
proto::eval(expr, context) first evaluates its arguments and then
delegates the result to context::operator()(proto::tag::xxx, ...args...)

If the above is correct: can I write
my_context::operator()(proto::tag::fucntion, ...args...) to catch it first
and hinder delegation to placeholder_t::operator()(...args...)?

(Sorry if this is answered later in the docs, I am not through yet)

Markus


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