On 9/26/05, jarvi <jarvi@cs.tamu.edu> wrote:
the var function makes a lambda functor out of a variable, so you can
write the expression as:

var(n) = _1

 Thanks, I should have seen that one in the manual. Posting at the end of a work day is
obviously not a good idea :-) I've got another lambda related question though. My example was
a useless simplification, what I'm really trying to do is to read data from an STL vector into a legacy
matrix class which doesn't have an iterator.

for_each( raster.begin(),
                  raster.end(),
                  ( var( out2( h - 1 - c / w, c % w ) ) = _1,
++var( c )
                  )
                );


--
Alex Borghgraef