How to check at compile-time if a function that can be called with a specific set of arguments exists?
问题 This is different from checking if a specific function is defined. Here, for this check to return true , the function has to be defined and passing the arguments of a certain type should result in a valid call. Example: for a function f and an argument of type T && , the check should return true if f is a valid function that accepts—either directly or through implicit conversion—an argument of type T && . void f(int &) {}; int main(int argc, char **av) { isFunctionCallable<int>(f); // true