|
Boost Users : |
Subject: Re: [Boost-users] Confused with Lambda library usage
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-12-13 07:25:43
----- Original Message -----
From: "QPlace" <quiteplace_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Saturday, December 13, 2008 5:19 AM
Subject: [Boost-users] Confused with Lambda library usage
>
> 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<Unit*> lst;
> Test t;
> for_each (lst.begin(), lst.end(), ?// I want to call t.dosmth with each Unit* in list
> }
>
> Any help will be greatly appreciated.
Hi,
you can take a look at the documentation
Lambda expressions in details > Member functions as targets
Best,
Vicente
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