[signal] Invoking connect with same argument a second time allowed?
Is it allowed to call connect() with the same argument (slot) a second time (without disconnecting in between)? I've been checking the documentation at http://www.boost.org/doc/html/boost/signalN.html#id1033842-bb but couldn't find any answer. I assume it is allowed (it doesn't throw any exception et al.) but don't want to build a software based on assumptions really. ;-) Boris
On Jun 6, 2007, at 6:10 AM, Boris wrote:
Is it allowed to call connect() with the same argument (slot) a second time (without disconnecting in between)? I've been checking the documentation at http://www.boost.org/doc/html/boost/signalN.html#id1033842-bb but couldn't find any answer. I assume it is allowed (it doesn't throw any exception et al.) but don't want to build a software based on assumptions really. ;-)
Yes, you can call connect() with the same argument twice. You will get two separate slots that call the same function. Doug
On Thu, 07 Jun 2007 09:31:29 +0900, Douglas Gregor
On Jun 6, 2007, at 6:10 AM, Boris wrote:
Is it allowed to call connect() with the same argument (slot) a second time (without disconnecting in between)? I've been checking the documentation at http://www.boost.org/doc/html/boost/signalN.html#id1033842-bb but couldn't find any answer. I assume it is allowed (it doesn't throw any exception et al.) but don't want to build a software based on assumptions really. ;-)
Yes, you can call connect() with the same argument twice. You will get two separate slots that call the same function.
Assuming that sig.disconnect(&callback_function) works - it will remove then both slots? Boris
On Jun 7, 2007, at 6:24 AM, Boris wrote:
On Thu, 07 Jun 2007 09:31:29 +0900, Douglas Gregor
wrote: On Jun 6, 2007, at 6:10 AM, Boris wrote:
Is it allowed to call connect() with the same argument (slot) a second time (without disconnecting in between)? I've been checking the documentation at http://www.boost.org/doc/html/boost/signalN.html#id1033842-bb but couldn't find any answer. I assume it is allowed (it doesn't throw any exception et al.) but don't want to build a software based on assumptions really. ;-)
Yes, you can call connect() with the same argument twice. You will get two separate slots that call the same function.
Assuming that sig.disconnect(&callback_function) works - it will remove then both slots?
Yes. - Doug
participants (2)
-
Boris
-
Douglas Gregor