On 11/23/2011 04:33 PM, Allan Nielsen wrote:
It might be me which does not understand it, but as I read the documentation funciton_types is for manipulating functions pointers, not to manage template arguments...
Please correct me if I'm wrong Okay, I got it...
is one template argument... : typename boost::function_types::result_type<T0>::type is the return type, and I can use parameter_types and MPL to iterate over the parameters. Clever.. But how do I implement the call interface:
template<typename T> struct IfCall { typedef typename boost::function_types::result_type<T0>::type R;
R call( /* T0, T1, T2...*/ ) { // can I get the MPL sequence into the method signature?? } };
You need to use the preprocessor for this; in that case, you can also
get rid of Boost.FunctionTypes.
#include