Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-04-11 11:39:55


From: "Douglas Gregor" <gregod_at_[hidden]>
> Thomas,
> I agree with your comment that it is unclear that:
>
> boost::signal<int, int, int>::combiner<maximum<int> >::type sig_max;
>
> declares a signal and not a combiner. I believe that instead of just
> renaming 'combiner' to 'with_combiner', Signals should adopt the named
> template parameters format used in the iterator adaptors library, so the
> above would become:
>
> boost::signal<int, int, int,
> boost::signals::combiner_is<maximum<int> > sig_max;
>
> With a few using declarations it would be more readable:
>
> boost::signal<int, int, int, combiner_is<maximum<int> > > sig_max;
>
> This syntax is clearer to me; does it work for you as well?

FWIW I like your original named parameters approach better.

boost::signal<int, int, int>::combiner_is< maximum<int> >::type sig_max;

Also,

typedef boost::signal<int, int, int> signal_type;
typedef signal_type::combiner_is< maximum<int> >::type signal2_type;


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