Boost logo

Boost Users :

From: Alexander Borghgraef (alexander.borghgraef.rma_at_[hidden])
Date: 2005-09-27 07:56:41


On 9/26/05, jarvi <jarvi_at_[hidden]> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net