Boost logo

Boost :

Subject: Re: [boost] [range] treating N-ary function with N-1 default args as unary
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-07-03 16:05:51

On 03/07/2012 16:28, Stewart, Robert wrote:
> Mathias Gaunard wrote:

>> struct foo_type
>> {
>> template<class Sig>
>> struct result;
>> template<class This, class A0>
>> struct result<This(A0)>
>> {
>> typedef decltype(foo(declval<A0>())) type;
>> };
>> template<class A0>
>> typename result<foo_(A0&&)>::type operator()(
> ^^^^
> That clearly is a typo and I'm not certain what you actually meant.

foo_type, obviously.

> Wouldn't there need to be a different macro for each number of actual arguments? That is, one for unary, one for binary, etc. or did you mean something else?

The macro would take the number of arguments as a parameter.

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