
Joel de Guzman
should be easy enough to detect. There is in fact something that you can use:
template <typename T> struct is_actor;
Thanks, that will be useful. But I also need to determine if the phoenix
actor has an operator() that can be called with certain arguments. I will have
a functor passed to my library that may be binary vs. trinary and I go down
a different static code path depending on the case.
Perhaps the detection of is_callable here is near impossible without SFINAE
with expressions. But how about a simpler problem:
double binary_func(double x, double y){return x;}
double unary_func(double x){return x;}
auto unary_f = bind(&unary_func, _1);
auto binary_f = bind(&binary_func, _1, _2);
auto binary_f2 = _1 + _2;
static_assert(functor_arity