#include <iostream>
#define HAS_MEMBER(member) \
template <typename T, typename ...Args> \
struct has_member_##member { private: \
template <typename U> \
static auto Check(int) -> \
decltype(std::declval<U>().member(std::declval<Args>()...), std::true_type()); \
template <typename U> \
static std::false_type Check(...);\
public: \
enum { value = std::is_same<decltype(Check<T>(0)), std::true_type>::value };\
};

class my_class {
public:
void fun0() {
}
void fun1(int x) {
}
void fun2(int x, int y) {
}
};
HAS_MEMBER(fun0);
HAS_MEMBER(fun1);
HAS_MEMBER(fun2);
int main() {
std::cout << has_member_fun0<my_class>::value << std::endl;
std::cout << has_member_fun1<my_class, int>::value << std::endl;
std::cout << has_member_fun2<my_class, int, int>::value << std::endl;

return 0;
}