Boost logo

Boost :

Subject: Re: [boost] [function_types] is there an equivalent for functors?
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-07-05 14:18:22


Jeffrey Lee Hellrung, Jr. wrote:
> You can, however, get away with querying whether a function object can
> be called with a specific signature, though the machinery to do this
> is relatively complex. I think something working is found in
> Boost.Proto as "can_be_called".
If the functor follow the result_of protocol, a traits can be made to
test if a functor F can be called with arguments A0,..,An
with a syntax like can_be_called<F(A0,...,An)>

Here is a sample implementation:

http://codepad.org/H5CtU5sa


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