Boost logo

Boost :

Subject: Re: [boost] [proto][can_be_called]
From: Andy Venikov (avenikov_at_[hidden])
Date: 2010-05-07 11:06:22

Kim Kuen Tang wrote:
> Eric Niebler schrieb:
>> On 5/6/2010 2:43 PM, Jesse Perla wrote:
>>> Larry Evans <cppljevans <at>> writes:
>>>> I just did svn update for trunk, and then grep'ed for can_be_called;
>>>> however, nothing turned up. Also:
>> <snip>
>> See if the code attached to the following ticket meets your needs:
> I ran into the same problem some months ago and did also my own
> implementation.
> However the implementation by eric_niebler seems to be more generic and
> it works IMHO also for boost::function and boost::phoenix.
> (Verified by some simple test cases)
> Are test cases and documentation the only things that are needed such
> that is_callable_with_args can be included in boost?
> Btw what does calling convention on function types mean here ?
> -Kim
> _______________________________________________
> Unsubscribe & other changes:

I would definitely vote for this functionality to be included into
Boost. This is a third time in the past 6 month that I needed it.

I also wanted to return to another request of mine that I raised a
couple of months ago, namely for boost::bind to use can_be_called to
SFINAE away operator()'s that are not callable. Currently, bind's
operator() is just a plain template. It means that it breaks the the
type uniformity. For example, if an underlying functor can't be called
with given arguments, bind's operator() would still get instantiated and
then you'll get a compile-time error not during SFINAE, but inside
operator(), which is too late.


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