
Rutger ter Borg
So, in short, does anyone know of a generic trick to know if F can be called with a set parameters {a0,...,aN} (without the compile error)?
Not sure if this is what you want, but I was pointed to the following previously: http://www.boost.org/doc/libs/1_42_0/doc/html/proto/appendices.html#boost_pr... pendices.implementation.function_arity This works for most function objects, but not for function pointers. To implement those, I ended up doing a dispatch and determining if the arguments were convertible. Here is a link to my (inelegant) solution: http://svn.econtoolkit.com/libraries/trunk/etk/etk/meta/function_traits.hpp And my test file: http://svn.econtoolkit.com/libraries/trunk/etk/tests/meta/test_function_trai... Also: I found that this worked fine with C++0X lambdas on Intel 11.1 but didn't work with Phoneix, boost::lambda, or std::bind. I posted a question on this problem for phoenix a little while ago, but didn't find a solution.