OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / typedef11.C
1 // Author: Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/26693
3 // { dg-do compile }
4
5
6 class Alpha
7 {
8   typedef int X; // { dg-error "'typedef int Alpha::X' is private" }
9 };
10
11 template<int>
12 class Beta
13 {
14     typedef int Y; // { dg-error "'typedef int Beta<0>::Y' is private" }
15 };
16
17 template <int>
18 int
19 bar ()
20 {
21   Beta<0>::Y i = 0;
22   return Alpha::X ();
23 }
24
25 int i = bar<0> (); // { dg-error "within this context" }