Boost logo

Boost :

Subject: Re: [boost] [bind] Function call operator is a template?!
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-12-16 19:06:34

Mathias Gaunard wrote:
> Andy Venikov a écrit :
>> I'm not going to debate whether it's right or wrong, but I'm still
>> curious - why did it have to be a template? When bind() is called it
>> already has all the information about the function's signature
> Not in the general case.
> For function pointers or member function pointers, I suppose it is the
> case though.

It's not possible in general for function pointers either.

void f( X x, Y y );

bind( f, _1, _1 ); //?

I agree that there are many cases in which it's possible though.

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