[signals] slot<Signature>, slot::track() and bind syntactic sugar
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've added template parameters to the slot class in thread_safe_signals for specifying its signature, as slot<Signature> or slot1<R, T1>, etc. So now slots can be bound to each other. I've also dropped the automatic discovery of tracked objects, and added slot::track() functions. There is now some syntactic sugar for bind, if a slot constructor is called with more than one argument, then the arguments will automatically be passed through bind(). I tried using bind<R>(), since the slot knows what its result type should be, but gcc gave me ambiguous overload errors when bind<R> was given a function pointer. There is a little test program in the sandbox now too, at boost-sandbox/libs/thread_safe_signals/test/track_test.cpp. I encountered one problem with the bind syntactic sugar, described in the test program's comments. I found the error message unhelpful, therefore it must be a compiler bug :) - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFF5KRY5vihyNWuA4URAo2mAJ45BAJvKKl8rHPXGsgn7a2fjmDLVQCeLb0R ln07v8CCYxbwE7topMmhZQ4= =4kwy -----END PGP SIGNATURE-----
participants (1)
-
Frank Mori Hess