Subject: [boost] [function_types] is there an equivalent for functors?
From: Edd Dawson (lists_at_[hidden])
Date: 2010-07-05 13:46:04


Hi all,

I'm looking for code that does what boost::function_types::parameter_types does
but for functors. Support for things such as
boost::bind/lambda/function/signals(1&2)/etc and the standard binders and
adaptors would be nice.

I specifically want to be able to do something like:

   template<typename Functor>
   void f(const Functor &f)
   {
       typedef typename functor_params<Functor>::type params; // an mpl sequence
       const std::size_t arity = functor_arity<Functor>::value;
       // ...
   }

I started writing code for this but I've come to the point where I can't see a
way to support libraries such as boost::bind without relying on their
implementation details.

But perhaps something like this already exists?

Thanks,

Edd