Hi, all!
I'd like to get a member function of an object to handle signals - is
that possible with boost::bind?
I tried the following, which doesn't work:
SomeClass{
...
bool done_;
public:
void handler_done(int signal){
std::cout << "Recieved signal " << signal <<" ..." <
#include
...
SomeClass someClass;
signal( SIGINT,boost::bind( &SomeClass::handler_done, &someClass,_1) );
...
I get the following error (g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3):
error: cannot convert ‘boost::_bi::bind_t, boost::_bi::list2,
boost::arg<1> > >’ to ‘void (*)(int)’ for argument ‘2’ to ‘void (*
signal(int, void (*)(int)))(int)’
Is this generally impossible, or am I just making some stupid error from
not really understanding boost::bind properly?
Thanks in advance!
Tim