
27 Oct
2004
27 Oct
'04
9:30 p.m.
Dirk Gregorius wrote:
Hi,
I have a short question regarding the boost::signals library. Is it possible to connect a member function to a signal or must the passed slot be either static or be a function object? If yes what would be the syntax to pass the function and the associated object reference?
Boost::bind lets you create a function object from a pointer to an object and a pointer to a member function of the object's class. You can pass the result of such a boost::bind to boost::signals as your slot.