PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / access11.C
blob9414d01798be81631aad90f7be82e60c28f447da
1 // Copyright (C) 2003 Free Software Foundation
2 // Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3 // { dg-do compile }
5 // Access checking during explicit instantiation.
7 class A {
8   typedef int X;                // { dg-message "private" }
9 };
11 class X {
12   private:
13   template <typename T> struct Y;
16 template <> struct X::Y<int> {
17   A::X x;                       // { dg-error "this context" }
20 template <typename T> struct X::Y {
21   typename T::X x;              // { dg-error "this context" }
24 template struct X::Y<A>;        // { dg-message "required from here" }