Boost logo

Boost :

Subject: Re: [boost] [functional] Interested in can_be_called<F, Sig> metafunction?
From: TONGARI (tongari95_at_[hidden])
Date: 2012-11-07 08:23:37


2012/11/7 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>

> has_ is related to something a class can have, while is_ can be applied to
> a class or a function.

Not necessary. Those in Operator Type Traits can be used on non-class
types, e.g. has_plus<int>, so has_call is consistent with that.

> But do you think member-function ptr fits in this context? e.g.
>>
>> has_call<void(X::*)(), void()>::type // mpl::true_
>>
>> I don't think this fill you initial can_be_called. Do you?

Actually I'm not sure if it's feasible to support member-function ptr at
all, what do others think?

> Could you say what is wrong following the parent lib?

Nothing, just a bit tedious :p

So my current prefer would be "has_call" under Operator Type Traits
category.

BTW, the History section seems unupdated even after the extension added :-/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk