#include <iostream>
#include <type_traits>
using namespace std;
template<typename... > struct Voider { using Type = void; };
template<typename... TArgs> using VoidT = typename Voider<TArgs...>::Type;
template< class, class = void >
struct hasGetCount : false_type { };
template< class T >
struct hasGetCount<T, VoidT<decltype(T::getCount)>>
: std::is_same<decltype(std::declval<T>().getCount()), int>::type { };
struct TestTrue
{
int getCount() { return 0; }
};
struct TestFalse
{
};
int main()
{
static_assert(hasGetCount<TestTrue>::value == true, "");
static_assert(hasGetCount<TestFalse>::value == false, "");
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0ZW1wbGF0ZTx0eXBlbmFtZS4uLiA+IHN0cnVjdCBWb2lkZXIgeyB1c2luZyBUeXBlID0gdm9pZDsgfTsKdGVtcGxhdGU8dHlwZW5hbWUuLi4gVEFyZ3M+IHVzaW5nIFZvaWRUID0gdHlwZW5hbWUgVm9pZGVyPFRBcmdzLi4uPjo6VHlwZTsKCnRlbXBsYXRlPCBjbGFzcywgY2xhc3MgPSB2b2lkID4Kc3RydWN0IGhhc0dldENvdW50IDogZmFsc2VfdHlwZSB7IH07CiAgICAgCnRlbXBsYXRlPCBjbGFzcyBUID4Kc3RydWN0IGhhc0dldENvdW50PFQsIFZvaWRUPGRlY2x0eXBlKFQ6OmdldENvdW50KT4+IAo6IHN0ZDo6aXNfc2FtZTxkZWNsdHlwZShzdGQ6OmRlY2x2YWw8VD4oKS5nZXRDb3VudCgpKSwgaW50Pjo6dHlwZSB7IH07CgoKc3RydWN0IFRlc3RUcnVlCnsKICAgIGludCBnZXRDb3VudCgpIHsgcmV0dXJuIDA7IH0JCn07CgpzdHJ1Y3QgVGVzdEZhbHNlCnsKCn07CgppbnQgbWFpbigpIAp7CglzdGF0aWNfYXNzZXJ0KGhhc0dldENvdW50PFRlc3RUcnVlPjo6dmFsdWUgPT0gdHJ1ZSwgIiIpOwoJc3RhdGljX2Fzc2VydChoYXNHZXRDb3VudDxUZXN0RmFsc2U+Ojp2YWx1ZSA9PSBmYWxzZSwgIiIpOyAKCQoJcmV0dXJuIDA7Cn0=