
-----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 <boost/signals2/signal.hpp> #include <iostream> using namespace boost; void callback(int cookie) { std::cout << cookie << std::endl; } int main() { signals2::signal<void(int, double, int)> sig; // I'd like to bind cookie=5 and to connect such a binder to the signal. sig.connect(bind(&callback, 5)); sig(1, 2.2, 3); return 0; } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkp7LBwACgkQ5vihyNWuA4UWVgCfcn2/dm5odcy7NvR80IDx1dps U3IAnj+DTRbr6W4jLi+lqY+6GwyqraRO =4rtH -----END PGP SIGNATURE-----