Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-03-10 11:46:31


Hi,

  This is an open request for comments and criticism. Jaakko Jarvi and I
have been working on a expression template library for use in place of
functors with STL algorithms. This code is in an early alpha state, it
compiles with gcc 2.95.2 but may have bugs.

  The basic design is to use Tuples to bind up the statements into
expression templates, then where the operator()(...) is called build the
function object with the correct types. Because of this delayed binding it
is not necessary to specify the type of the argument to the lambda function.

  Simple Examples:

  int a[10];
  for_each(a, a+10, cout << free1 * 10 << endl);

  will print the 10 * values of the elements of a.

  int *pa[10];

  transform(a, a+10, pa, free2 = &free1);

  will assign to each element of pa, the corresponding address of the
element of a.

  int *iter = find_if(b,b+10, *free1 > 5 && *free1 <= 10);

  will return the first element of b, whose contents is in the range 5 < x
<= 10.

  I'll leave the complex examples for those of you who are interested and go
to the web page.

  This posting is to boost, because the readers of this list appear to be
the best of the best of the C++ world.

  What we'd like is comments on code review, design review, usefulness,
forward direction suggestions, etc. (I'd ask for peer review, but I'm not
sure I qualify to be a peer after reading all your posts.) (Shameless
flattery.)

  The library is at:
http://lambda.cs.utu.fi

  -Gary-

gary.powell_at_[hidden]

PS
  My stupid domain server couldn't go there directly this morning, but after
I went to the site http://www.cs.utu.fi it found it. Go figure.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk