From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-10 07:24:30
Tobias Schwinger wrote:
> However, here are two possible recipes of how a Boost.Function could be
> analyzed with this library:
> 1. AFAIK Boost.Function uses a non-templated parentheses operator
> therefore you can apply a typeof operator (or Boost.Typeof) on a pointer
> to its operator() function (you can do this for any functor with a
> non-template operator()).
> 2.a. The "preferred syntax" is a template parametrized with a (plain)
> function type to describe its signature. Partial specialization or
> overloading can be used to get this template argument from an
> instantiation of 'boost::function'.
> 2.b. The "compatible syntax" is a template parametrized with the
> sub-types of its signature. There is an (even documented)
> "corner-case-feature" of 'function_type_signature' that allows you to
> grab the argument list from a class template instantiation. Because of
^^^^ This feature has been removed ! But it doesn't hurt here because:
- Possibiliy No.1 is the easier and better way to go
- It is unlikely that it would work on compilers where the "compatible syntax"
of Boost.Function is required.
> this 'boost::functionN' is a valid signature for 'function_type' (given
> that 'function_type_signature.hpp' is included) together with the tag
> 'plain_function' to get the same type that a (preferred-syntax)
> 'boost::function' is instantiated with.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk