$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: yjwang_bj
Date: 2003-02-18 12:05:21
> Use the Bind or Lambda library. An example:
>
> class X {
> public:
> void foo(int);
> };
>
> X* x;
> boost::signal<void (int)> 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