Boost logo

Boost :

Subject: Re: [boost] [function_types] is there an equivalent for functors?
From: Edd Dawson (lists_at_[hidden])
Date: 2010-07-05 15:36:23


On 7/5/2010 8:21 PM, Daniel Walker wrote:
> And if you know a signature of a functor, you can use function_types
> directly with the signature. For example,
>
> template<typename Signature>
> void f(const boost::function<Signature> &f)
> {
> using boost::function_types::parameter_types;
> using boost::function_types::function_arity;
>
> typedef typename parameter_types<Signature>::type params; // an mpl sequence
> const std::size_t arity = function_arity<Signature>::value;
> // ...
> }

100 bonus points for implementing boost::bind support for me :)

Kind regards,

Edd


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