aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/access3.C
blob: ab56620772ed88604b6171b26a416c10a1312bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }

// PR c++/5387
// Enforcing access of typename type.

template <class T> struct A {
  typename T::template X<int> x;	// { dg-error "this context" }
};

class B {
  template <class T> class X {};	// { dg-error "private" }
};

int main()
{
  A<B> ab;				// { dg-message "required" }
}