// PR c++/96204 template struct has_type_member { static const bool value = false; }; template struct has_type_member { static const bool value = true; }; struct Parent; struct Child { private: friend struct Parent; typedef void type; }; struct Parent { static void f() { // The partial specialization does not match despite Child::type // being accessible from the current scope. extern int x[1]; extern int x[!has_type_member::value]; } };