3 template<class, class = void>
4 struct has_type_member {
5 static const bool value = false;
9 struct has_type_member<T, typename T::type> {
10 static const bool value = true;
17 friend struct has_type_member<Child>;
23 // The partial specialization matches because has_type_member<Child>
24 // is a friend of Child.
26 extern int x[has_type_member<Child>::value];