From: Joel de Guzman (joel_at_[hidden])
Date: 2007-10-08 03:42:54
Marco Costalba wrote:
> On 10/8/07, Joel de Guzman <joel_at_[hidden]> wrote:
>> There's no way to detect the signature
>> of a template function (the operator()):
> Perhaps you don't need this. You only need to check if the template
> function operator() matches one signature in the Signatures set.
> I have found this nice (and very small) code from Paul Mensonides that
> seems to works (at least for me)
> The limitation is that you have to specify the type of the function,
> but in our case is not a problem because we have a finite set called
> 'Signatures' among which to choose the operator() type.
> As you can see from his testing example:
> And check each one with has_function_call() until a match is found or
> return an error otherwise.
> Easier to say then to do ;-)
Cool! So if the RHS is a polymorphic function then it can be assigned
to all of the compatible Boost.Function objects? Nice!
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk