aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/typedef19.C
blob: f576d4828e432ec467ecb4b8b5802e5fbe91fe55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/40007
// { dg-do compile }

class A
{
  typedef int mytype; // { dg-error "'typedef int A::mytype' is private" }
};

template <class T>
class B : public A
{
};

template<class T>
class B<T*> : public A
{ // { dg-error "within this context" }
  mytype mem;
};

B<int*> b;