summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/typedef11.C
blob: c7c7c989f729330474b0abf0fd0a6eeadad1dfb3 (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;
  return Alpha::X ();
}

int i = bar<0> (); // { dg-error "within this context" }