Boost logo

Boost Users :

From: Igor R (boost.lists_at_[hidden])
Date: 2008-07-13 07:21:10


if (!sig.empty())
 doSomething();

But if you just want to "fire" your signal, you don't have to test its
emptiness.

2008/7/13, Simon Pickles <sipickles_at_[hidden]>:
> Hi,
>
> What is the correct syntax to test whether a signal has any slots
> connected?
>
> boost::signal<void(void)> sig;
>
> if (sig)
> DoSomething();
>
> This doesn't compile.
>
> Thanks
>
> Simon
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net