metaSMT 2
Functions
Lazy expression evaluation
Support

lazy evaluation of expressions with arguments More...

Functions

template<typename Context , typename Expr >
detail::lazy_call< Context, Expr > metaSMT::lazy (Context &ctx, Expr const &e)
 create a functor from an expression

Detailed Description

lazy evaluation of expressions with arguments

lazy created a polymorphic function object that, when called evaluates the enclosed expression.

lazy can be used store an expression in a function

 boost::function< result_type ( predicate const &, predicate const & ) > 
   andiN = metaSMT::lazy( ctx, And( arg1, Not(arg2)) ) ;

or to use in stl algorithms:

 std::vector< result_type > expr;
 ...
 tmp = std::accumulate(expr.begin(), expr.end(), initial,
    metaSMT::lazy(ctx, Xor(arg1, arg2) )
 );

Function Documentation

template<typename Context , typename Expr >
detail::lazy_call< Context, Expr > metaSMT::lazy ( Context &  ctx,
Expr const &  e 
)

create a functor from an expression

Definition at line 108 of file lazy.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines