Debian Codegraph @

gcc/testsuite/g++.dg/template/typedef11.C

raw
1 // Author: Dodji Seketeli <[email protected]>
2 // Origin: PR c++/26693
3 // { dg-do compile }
4
5
6 class Alpha
7 {
8 typedef int X; // { dg-message "private" }
9 };
10
11 template<int>
12 class Beta
13 {
14 typedef int Y; // { dg-message "private" }
15 };
16
17 template <int>
18 int
19 bar ()
20 {
21 Beta<0>::Y i = 0; // { dg-error "within this context" }
22 return Alpha::X (); // { dg-error "within this context" }
23 }
24
25 int i = bar<0> ();