13 Jun
2007
13 Jun
'07
11:20 p.m.
"Kirit Sælensminde"
I've been playing around with a few functional programming idioms in C++ using Boost.function and Boost.lambda and was wondering if it was possible to fetch out the argument type (i.e. int) from a type like this:
void (*somefunc)( int )
You don't need any libraries for this -- just use partial template
specialization:
template<class T> struct deduce_arg; //not defined
template<class A> struct deduce_arg