Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

more/gen/lambda.h File Reference

#include <iterator>
#include <more/gen/functional.h>

Include dependency graph for lambda.h:

Include dependency graph

Go to the source code of this file.

Namespaces

Defines


Define Documentation

#define MORE_COMMA   ,
 

#define MORE_CR1      T
 

#define MORE_CR2      T
 

#define MORE_CR3      T
 

#define MORE_CR4      T
 

#define MORE_CR5      T
 

#define MORE_DEF OP,
NAME,
RESULT   
 

Value:

namespace lambda_kns {\
    template<typename Expr1, typename Expr2> struct NAME##_expr {};\
    template<typename Expr1, typename Expr2>\
      struct expr< NAME##_expr<Expr1, Expr2> > {\
          typedef typename Expr1::result_type first_argument_type;\
          typedef typename Expr2::result_type second_argument_type;\
          typedef RESULT result_type;\
          template<typename Assign>\
            result_type operator()(const Assign& a) const {\
                return x(a) OP y(a);\
            }\
          expr(MORE_CR5(Expr1) x_, MORE_CR5(Expr2) y_) : x(x_), y(y_) {}\
        private:\
          Expr1 x;\
          Expr2 y;\
      };\
    template<typename T1, typename T2>\
      inline\
      expr< NAME##_expr< typename which_expr<T1>::eval,\
                         typename which_expr<T2>::eval > >\
      operator OP(MORE_CR5(T1) x, MORE_CR5(T2) y) {\
          return expr\
                < NAME##_expr< typename which_expr<T1>::eval,\
                               typename which_expr<T2>::eval > >(x, y);\
      }\
  }


Generated on Sat Sep 7 19:11:27 2002 for more with Doxygen 1.2.13.1. Doxygen 1.2.13.1 is written and copyright 1997-2002 by Dimitri van Heesch.