Boost C++ Libraries

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

Click here to view the latest version of this page.
PrevUpHomeNext

Struct eval

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

Synopsis

struct eval :  proto::callable {
  template<typename This, typename Expr, typename Context> 
  struct result<This(Expr, Context)> :  
    proto::result_of::eval<
      typename remove_reference< Expr >::type, 
      typename remove_reference< Context >::type 
    >
  {
  };

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

Description

eval public member functions

  1. template<typename Expr, typename Context> 
      typename proto::result_of::eval< Expr, Context >::type 
      operator()(Expr & expr, Context & context) const;

    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> 
      typename proto::result_of::eval< Expr, Context >::type 
      operator()(Expr & expr, Context const & context) const;

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


PrevUpHomeNext