
The Boost.Function_Types (Function_Traits?) library lets you handle syntax like double(double, double) easily.
Thank you for pointing out, apparently the library is Boost.TypeTraits/ function_traits, Here it is the example that worked for me: #include<functional> struct oldf : std::binary_function<int, int, int>{ result_type operator()(first_argument_type a, second_argument_type b) { return a+b; } }; #include<boost/static_assert.hpp> #include<boost/type_traits/function_traits.hpp> struct newf : boost::function_traits<int(int,int)>{ BOOST_STATIC_ASSERT(arity==2); result_type operator()(arg1_type a, arg2_type b){ //or result_type operator()(first_argument_type a, second_argument_type b){ return a+b; } }; int main(){} Thank you, Alfredo