Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Struct template eval



// In header: <boost/proto/context/callable.hpp>

template<typename Expr, typename ThisContext = Context> 
struct eval :  see-below {


A BinaryFunction that accepts an Expr and a Context, and either fans out the expression and passes it to the context, or else hands off the expression to DefaultCtx.

If Context is a PolymorphicFunctionObject such that it can be invoked with the tag and children of Expr, as ctx(typename Expr::proto_tag(), child_c<0>(expr),... child_c<N>(expr)), then eval<Expr, ThisContext> inherits from proto::context::callable_eval<Expr, ThisContext>. Otherwise, eval<Expr, ThisContext> inherits from DefaultCtx::eval<Expr, Context>.