Boost logo

Boost :

Subject: Re: [boost] [Signal] Variadic template implementation of signal/slot
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-05-22 16:14:18


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 22 May 2009, Doug Gregor wrote:
> I think it would be really, really cool to have a version of Signals2
> that uses variadic templates rather than preprocessor metaprogramming.
> For me, personally, I'd rather see it as an alternative implementation
> of exactly the same interface (switched based on
> BOOST_NO_VARIADIC_TEMPLATES) rather than a separate library. But,
> that's up to Frank :)

That seems like the way to go. I was thinking it might be good to expose a
separate variadic_signal which was completely free of preprocessor
metaprogramming, instead of keeping it entirely as an implementation detail.
But it seems to me now the existing signal interface might just need one
change to be implementable without preprocessor metaprogramming. The
arg1_type, arg2_type, etc typedefs need to be replaced with a template, so
for example

typedef signal<void (int)> sig_type;

sig_type::arg1_type

would look something like

sig_type::arg<0>::type

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoXB5oACgkQ5vihyNWuA4VgdwCgjSgN47i0nI1wLR1PfTwB7YgL
sakAn0AFMHpB/sl29O8uv4sjwpKm8ujo
=9Sj2
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk