#include <iostream>
using namespace std;

template <typename T>
class has_helloworld
{
	typedef char yes;
	typedef long no;

	template <typename C>
	static yes test(decltype(&C::helloworld));

	template <typename C>
	static no test(...);

public:
	enum { value = sizeof(test<T>(nullptr)) == sizeof(yes) };
};

class has_helloworld_class {
public:
	void helloworld() {};
};

class no_helloworld_class {
};

int main () {
	cout << has_helloworld<has_helloworld_class>::value << endl;
	cout << has_helloworld<no_helloworld_class> ::value << endl;
}