
20 May
2010
20 May
'10
4:30 p.m.
On Thu, 20 May 2010 12:41:37 +0200, Archie14
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));
std::for_each(lst.begin(), lst.end(), boost::lambda::bind(&C::store, boost::ref(c), boost::lambda::bind(&A::i, boost::lambda::_1))); HTH, Boris