I am trying to transfer the start for boost :: signal to boost :: bind object. So I want to trigger a signal with some pre-packaged arguments when calling boost ::.
What I have:
boost::signals2::signal<void(int)> sig; boost::function<void()> f = boost::bind( &(sig.operator()), &sig, 10);
But that does not work. I get the following error: error: there is no corresponding function to call bind (, ...
I also tried this:
boost::function<void()> f = boost::bind( (void(boost::signals2::signal<void(int)>::*)(int)) &(sig.operator()), &sig, 10);
But then I get the "address of the overloaded function without context type information."
So what is the correct syntax for this?
Brian source share