]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/template/typedef22.C
re PR c++/14777 (typedef doesn't fully expose base class type)
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / template / typedef22.C
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
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-error "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> ();