
27 Jan
2009
27 Jan
'09
3:25 p.m.
Olaf Krzikalla:
template
struct arity_dispatch< boost::function > { static void call(const boost::function & f) { f(getArg<T>(0), getArg<T>(1)); } };
Why not dispatch on the number of arguments that are available via getArg? You won't then need to know the arity of the function object (assuming it has one and only one arity, which it may not.)