18 Feb
2003
18 Feb
'03
5:05 p.m.
Use the Bind or Lambda library. An example:
class X { public: void foo(int); };
X* x; boost::signal
sig; // So the signal will call x->foo(y) when sig(y) is called: sig.connect(boost::bind(&X::foo, x, _1));
Doug
It works but with the unusual C++ syntax. In libsigc++, I can do like this: sig1.connect(slot(x, &X::foo)); Hope boost has something like this though the boost's way is more powerful. Thanks a lot, doug. Yujiang Wang