
12 Oct
2013
12 Oct
'13
6:28 p.m.
On 11 October 2013 22:46, Stzpz <newstzpz@gmail.com> wrote:
I am not sure what is lacking in VS2012, but there is some way to overcome this problem.
template<class T, int argNo> struct FunctorParameterType { static auto init() -> typename decltype(&T::operator()) { typedef typename decltype(&T::operator()) func_type; return func_type(); } typedef typename decltype(FunctorParameterType<T, argNo>::init()) func_type; typedef boost::function_types::parameter_types<func_type> parameter_types;
typedef typename boost::mpl::at_c<parameter_types, argNo>::type type; };
Nice one, thanks! I'll give it a try when I need it again. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net