On Tue, 18 Feb 2003, yjwang_bj
// 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));
But you can't do this: sig.connect(boost::bind(&X::foo, x, _3, y, boost::bind(f, _2, _1)));
Hope boost has something like this though the boost's way is more powerful.
Boost does not have what you are looking for. The bind syntax may be a little unusual, but for that slight oddity you get a syntax that is arbitrarily extensible. Perhaps I have been (un?)lucky, but I've found that in any project that needs the simple form (e.g., slot(x, &X::foo)), there is inevitably some place in the same project that needs a more advanced form. Once someone has grasped boost::bind to understand the advanced uses, the simple uses of boost::bind are trivial; why learn another primitive? Doug