Struct template callable_eval
boost::proto::context::callable_eval — A BinaryFunction that accepts a Proto expression and a callable context and calls
the context with the expression tag and children as arguments, effectively fanning the
expression out.
Synopsis
template<typename Expr, typename Context>
struct callable_eval {
typedef typename boost::result_of<
Context(
typename Expr::proto_tag,
typename proto::result_of::child_c<0>::type,
...
typename proto::result_of::child_c<N>::type,
)>::type
result_type;
result_type operator()(Expr &, Context &) const;
};
Description
<proto::context::callable_eval<>>требует, чтобы<Context>было полиморфным. Объект, на который можно ссылаться с тегом<Expr>и детьми в качестве выражений:
context(typename Expr::proto_tag(), proto::child_c<0>(expr), ... proto::child_c<N>(expr))
callable_eval public member functions
- <
result_typeoperator()(Expr&expr,Context&context)const;
>Параметры: | <context> | Призывной контекст оценки | <expr> | Текущее выражение |
|
Возвращается: | <
context(typename Expr::proto_tag(),
proto::child_c<0>(expr),...
proto::child_c<N>(expr))
> |