aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typedef19.C
blob: 2fac20ea065468a9e12b474de9193b6641d204e0 (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
{
  mytype mem; // { dg-error "within this context" }
};

B<int*> b;