metaSMT git
|
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 |
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) ) );