aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/template/typedef11.C
blob: a08d7b3a939f98048735a5710d99b8b907a6932f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Author: Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/26693
// { dg-do compile }


class Alpha
{
  typedef int X; // { dg-error "'typedef int Alpha::X' is private" }
};

template<int>
class Beta
{
    typedef int Y; // { dg-error "'typedef int Beta<0>::Y' is private" }
};

template <int>
int
bar ()
{
  Beta<0>::Y i = 0;		// { dg-error "within this context" }
  return Alpha::X ();		// { dg-error "within this context" }
}

int i = bar<0> ();