Is there a way to deduce the signature, result- and parameter-types, of a c++0x lambda as a Boost.MPL sequence, for example a boost::mpl::vector
? For example, for a lambda
[]( float a, int b ) -> void { std::cout << a << b << std::endl; }
I would like to get a boost::mpl::vector<void,float,int>
.
You can overload several functions to return the wanted type as described in this answer to a similar question.
C++0x lambdas which are "closure-objects" are functors. So you can use boost.Boost.FunctionTypes to decompose its
operator()
.Example: