2011/1/6 Hossein Haeri <powerprogman@yahoo.com>
I need to know whether a function object is callable with a given set of arguments. Obviously, the compiler will automatically let me know if it's not. Yet, the place where the compiler points my clients to is likely not to be suitable for them. So, the idea is to stop them at an appropriate point in my own code (perhaps with some appropriate error message and commenting) before the compiler nags about the unsuitability of the (function object) instantiation.

It will perhaps be a good starting point if I can check it before further the actual template instantiation of the function object. Any ideas now please?

This is actually possible in most cases. Check this nice article by Eric Niebler: http://www.boost.org/doc/libs/1_45_0/doc/html/proto/appendices.html#boost_proto.appendices.implementation.function_arity

Roman Perepelitsa.