[Qt-interest] Advices on safer SIGNAL macro
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Thu Oct 20 07:55:59 CEST 2011
On Thu, Oct 20, 2011 at 1:17 AM, Johannes Schaub
<schaub.johannes at googlemail.com> wrote:
> I've written myself a custom SIGNAL macro that at compile time checks that
> all parameter types I gave in the signature passed to SIGNAL are known at
> the point of use of SIGNAL:
>
> namespace static_signal_detail {
> template<typename>
> struct take { };
> }
>
> #define STATIC_SIGNAL(SIG) (static_signal_detail::take<void(void SIG)>(), \
> SIGNAL(SIG))
>
Interesting. How does this work?
-mandeep
More information about the Qt-interest-old
mailing list