[gcn] install.texi: Update for new ISA targets and their requirements
[gcc.git] / gcc / testsuite / g++.dg / template / access40a.C
blob94025c513b7898a6bb2828abd47999f3dff9ce5e
1 // PR c++/96204
3 template<class, class = void>
4 struct has_type_member {
5   static const bool value = false;
6 };
8 template<class T>
9 struct has_type_member<T, typename T::type> {
10   static const bool value = true;
13 struct Parent;
15 struct Child {
16 private:
17   friend struct has_type_member<Child>;
18   typedef void type;
21 struct Parent {
22   static void f() {
23     // The partial specialization matches because has_type_member<Child>
24     // is a friend of Child.
25     extern int x[1];
26     extern int x[has_type_member<Child>::value];
27   }