Boost logo

Boost Users :

Subject: Re: [Boost-users] Bind
From: Etienne Philip Pretorius (icewolfhunter_at_[hidden])
Date: 2009-05-04 00:59:17


Igor R wrote:
>> Can boost.bind() be used to delay the call to a member function until you
>> have gathered all the data types to populate the function parameter list?
>
> Yes, if you mean something like this:
>
> struct A
> {
> voif f(int a, double b, short c);
> };
>
> A *a = new A;
> function<void(int, double, short)> func = bind(&A::f, a, _1, _2, _3);
>
> // somewhere later:
> func(1, 2.0, 0);

Thank you!

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-use


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