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