Boost logo

Boost Users :

From: Alexander Borghgraef (alexander.borghgraef.rma_at_[hidden])
Date: 2005-09-26 09:13:30


Hi all,

I have been trying out boost::lambda for the first time, and I did encounter
something which I can't seem to solve.
Simplified, what I'd like to do amounts to this:

list<int> intlist; // fill up list someway
int n;
for_each( intlist.begin(),
intlist.end(),
n = _1
);

Obviously, this fails because it implies a cast from placeholder to int,
which isn't defined. Is there some way to do
this using lambda?

--
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