Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::proto::context::callable_eval< Expr, Context, 0 > Struct Template Reference

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. More...

#include <callable.hpp>

Public Types

typedef
proto::result_of::value< Expr
const & >::type 
value_type
 
typedef BOOST_PROTO_RESULT_OF
< Context(typename
Expr::proto_tag, value_type) >
::type 
result_type
 

Public Member Functions

result_type operator() (Expr &expr, Context &context) const
 

Detailed Description

template<typename Expr, typename Context>
struct boost::proto::context::callable_eval< Expr, Context, 0 >

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.

callable_eval<> requires that Context is a PolymorphicFunctionObject that can be invoked with Expr's tag and children as expressions, as follows:

context(Expr::proto_tag(), value(expr))

Member Typedef Documentation

template<typename Expr , typename Context >
typedef BOOST_PROTO_RESULT_OF< Context(typename Expr::proto_tag, value_type) >::type boost::proto::context::callable_eval< Expr, Context, 0 >::result_type
template<typename Expr , typename Context >
typedef proto::result_of::value<Expr const &>::type boost::proto::context::callable_eval< Expr, Context, 0 >::value_type

Member Function Documentation

template<typename Expr , typename Context >
result_type boost::proto::context::callable_eval< Expr, Context, 0 >::operator() ( Expr &  expr,
Context &  context 
) const
inline
Parameters
exprThe current expression
contextThe callable evaluation context
Returns
context(Expr::proto_tag(), value(expr))

References boost::phoenix::context(), and boost::proto::value().


The documentation for this struct was generated from the following file: