
20 May
2010
20 May
'10
10:41 a.m.
Example: struct A { int i; }; class C { public: void store(int i); }; boost::ptr_vector<A> lst; C c; std::for_each (lst.begin(), lst.end(), boost::lambda::bind(&C::store, c, boost::lambda::_1.i)); Question: construct boost::lambda::_1.i is invalid. I understand why it is so, but can't find a way to reference member variable in this case. Any advise or referral to the specific paragraph in boost::lambda documentation is appreciated. Thanks.