Debian Codegraph @

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

raw
1 // Contributed by Dodji Seketeli <[email protected]>
2 // Origin: PR c++/14777
3 // { dg-do compile }
4
5 template <typename T>
6 struct B
7 {
8 protected:
9 typedef int M; // { dg-message "protected" }
10 };
11
12 template <typename T>
13 struct A : B<T> {
14 typedef typename B<char>::M N; // { dg-error "context" }
15 A (int = N ());
16 };
17
18 A<int> a = A<int> ();