|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-09-06 13:37:46
On Friday 06 September 2002 02:19 pm, Eric Woodruff wrote:
> typedef Arg1 argument_type; // If N == 1
>
> typedef Arg1 first_argument_type; // If N == 2
> typedef Arg2 second_argument_type; // If N == 2
>
>
> What was the purpose in that? That assumes a template based library that
> uses functors can actually differentiate between the two (easily, or at
> all). Now my library cannot easily scale from 1 argument to 2! (And that
> isn't a lot to ask for.)
>
> It should have at least alilased argument_type to first_argument_type for N
> == 1.
argument_type is required by the AdaptableUnaryFunction concept
first_argument_type and second_argument_type are required by the
AdaptableBinaryFunction concept
I can supply:
typedef ArgI argI_type; // 1 <= I <= N
BOOST_STATIC_CONSTANT(int, arity = N);
Signals already does this; Function should, too.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk