
14 Dec
2008
14 Dec
'08
12:19 a.m.
On Sat, 13 Dec 2008 05:19:07 +0100, QPlace
Cannot figure out how to properly use lambda library in following situation (pseudo-code below):
class Unit { };
class Test { public: void dosmth(Unit* unit) {} };
int main() { vector
lst; Test t; for_each (lst.begin(), lst.end(), ?// I want to call t.dosmth with each Unit* in list }
for_each(lst.begin(), lst.end(), boost::lambda::bind(&Test::dosmth, boost::ref(t), boost::lambda::_1)); HTH, Boris