Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-09-06 13:51:56

Hrm, the most useful thing for me would be a consistent manor for accessing
the first argument type.

I've added the additional typedef in my local copy, it was easy to do.

----- Original Message -----
From: Douglas Gregor
Newsgroups: gmane.comp.lib.boost.devel
Sent: Friday, 2002:September:06 14:37
Subject: Re: Boost.Function Complaint - Unnecessary Duality

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
> == 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.

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at