// 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 has_type_member; typedef void type; }; struct Parent { static void f() { // The partial specialization matches because has_type_member // is a friend of Child. extern int x[1]; extern int x[has_type_member::value]; } };