[signals2, bind] connecting a slot with unrelated signature

Hello,
Lets assume we've got an arbitrary signal that we don't know it's
exact signature, and a function we'd like to connect as a slot. The
function ignores all the signal arguments:
void callback()
{
std::cout << "kuku" << std::endl;
}
int main()
{
signals2::signal

It turns out that the simple nested binds with protect() solve this. Sorry for the noise.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 06 August 2009, Igor R wrote:
It turns out that the simple nested binds with protect() solve this.
Why do you need nested binds? Doesn't this work?:
#include

Why do you need nested binds? Doesn't this work?: <...> sig.connect(bind(&callback, 5));
Actually, my question arose because the above line failed to compile. But when I re-check it now, it compiles as expected. I was probably hallucinating... Sorry.
participants (2)
-
Frank Mori Hess
-
Igor R