Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-02-24 16:03:13


Peter Soetens wrote:
>
> I thought solving it with the (to be accepted)
> function_types::function_type_arity<BoundType>::type::value, but the latest
> version of function_types does not 'support' inspection of bound object
> types.

The proposed FunctionTypes library is designed to provide introspection and synthesis of builtin types and portably deal with compiler extensions and bugs. Support for classes that model the functor concept is simply not what the library is for (you probably knew and that's the reason why the word 'support' is quoted, I figure).

> Other library writers must have felt a need for this interface as well ?

Well I did, that's why FunctionTypes exists ;-) because -->

> Or am I missing something ?

--> you can, however, use FunctionTypes on '&T::operator()' but operator() must neither be templated nor ambiguously overload for things to work (as with e.g. Boost.Function), otherwise (as with e.g. Boost.Bind) detection without help from the functor (an 'arity' member constant or the like) is not implementable.

Regards,

Tobias


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