Boost logo

Boost :

Subject: Re: [boost] painless currying
From: Eric Niebler (eric_at_[hidden])
Date: 2011-09-03 12:12:46

On 9/3/2011 10:48 AM, Larry Evans wrote:
> when passed arguments that cannot
> possibly be valid, the arguments just keep accummulating
> in the curryable<F,Args...>::argI.


> It would be helpful
> if some diagnostic were issued in case too many arguments
> are supplied.

I agree it would be helpful, but I don't think that's possible. Without
true introspection, there is no way to know a priori what the max arity
of the bound function is, hence no way to know when we've accumulated
more arguments than are valid. It just keeps collecting arguments in a
vain attempt to satisfy the can_be_called predicated.

Eric Niebler
BoostPro Computing

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