Boost logo

Boost Users :

Subject: [Boost-users] A question on for_each() and placeholder.Can any one with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2009-06-27 20:41:09


By using Dev-C++, I used lambda expression, I want to know that if I white:
typedef std::vector<int> vect1;
std::vector<vect1> vect2;
vect2 vect2Instance;
then
std::for_each(vect2Instance.begin(),vect2Instance.end(),
         std::for_each(_1.begin(),_1.end(),_1+=2));
is legal or not? And if legal ,Does the first two _1's mean a number
 in vect2 (i.e. a vect1) and the last _1 is a number in vect1(i.e. a int)?
Can any one with kindness help me?



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