#include <iostream>
template < typename T>
struct to_void
{
typedef void type;
} ;
class Foo
{
friend struct Checker;
typedef int TD;
} ;
struct Checker
{
template < typename T, typename dummy = void >
struct has_TD : std:: false_type { } ;
template < typename T>
struct has_TD< T, typename to_void< typename T:: TD > :: type > : std:: true_type { } ;
} ;
int main( )
{
std:: cout << std:: boolalpha << Checker:: has_TD < Foo> :: value << std:: endl ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8dHlwZW5hbWUgVD4Kc3RydWN0IHRvX3ZvaWQKewoJdHlwZWRlZiB2b2lkIHR5cGU7Cn07CgpjbGFzcyBGb28KewoJZnJpZW5kIHN0cnVjdCBDaGVja2VyOwoKCXR5cGVkZWYgaW50IFREOwp9OwoKc3RydWN0IENoZWNrZXIKewoJdGVtcGxhdGUgPHR5cGVuYW1lIFQsIHR5cGVuYW1lIGR1bW15ID0gdm9pZD4KCXN0cnVjdCBoYXNfVEQgOiBzdGQ6OmZhbHNlX3R5cGUge307CgoJdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CglzdHJ1Y3QgaGFzX1REPFQsIHR5cGVuYW1lIHRvX3ZvaWQ8dHlwZW5hbWUgVDo6VEQ+Ojp0eXBlID4gOiBzdGQ6OnRydWVfdHlwZXt9Owp9OwoKaW50IG1haW4oKQp7CglzdGQ6OmNvdXQgPDwgc3RkOjpib29sYWxwaGEgPDwgQ2hlY2tlcjo6aGFzX1REPEZvbz46OnZhbHVlIDw8IHN0ZDo6ZW5kbDsKfQ==