
Jesse Perla wrote:
Yup. I think it is very useful. Though without getting it to work with phoenix or std::tr1::bind, I think it have limited appeal. I also would guess (though haven't tested) that the trick fails with boost::function as well.
I have it working in conjunction with Boost.Function. I extended boost::function_types::parameter_types<T> to also work for boost::function. Then, if the expression is_callable< some_unknown_functor, boost_function_parameter_types > evaluates to true, then I can do the assignment (the right one from a variant of functions), boost::function< known_signature > = some_unknown_functor this works fine (the parameter types come from the boost::function). What do you mean exactly by support for bind? As long as you supply the parameters, it should work. I.e., is_callable< unknown_bind_expression, known_parameters > should also work. Could you provide an example / test case? Thanks, Rutger