Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct eval

boost::proto::functional::eval — A PolymorphicFunctionObject type for evaluating a given Proto expression with a given context.

Synopsis

// In header: <boost/proto/eval.hpp>


struct eval :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename Expr, typename Context> 
  struct result<> :  
    proto::result_of::eval<
      
  {
  };

  // public member functions
  template<typename Expr, typename Context> 
    proto::result_of::eval<  
    (, ) ;
  template<typename Expr, typename Context> 
    proto::result_of::eval<  
    (, ) ;
};

Description

eval public member functions

  1. template<typename Expr, typename Context> 
      proto::result_of::eval<  
      ( expr,  context) ;
    Evaluate a given Proto expression with a given context.

    Parameters:

    context

    The context in which the expression should be evaluated.

    expr

    The Proto expression to evaluate.

    Returns:

    typename Context::template eval<Expr>()(expr, context)

  2. template<typename Expr, typename Context> 
      proto::result_of::eval<  
      ( expr,  context) ;

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


PrevUpHomeNext