#include <iostream>
using namespace std;
 
template <typename T>
class has_helloworld
{
	typedef char yes;
	typedef long no;
 
	template <typename C>
	static yes test(typename C::helloworld*);
 
	template <typename C>
	static no test(...);
 
public:
	enum { value = sizeof(test<T>(nullptr)) == sizeof(yes) };
};
 
struct has_helloworld_class {
	using helloworld = int;
};
 
class no_helloworld_class {
};
 
int main () {
	cout << has_helloworld<has_helloworld_class>::value << endl;
	cout << has_helloworld<no_helloworld_class> ::value << endl;
}