summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/access11.C
blob: 72fc333c1afcc98ade33932d9ad0e25ac84dac56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// { dg-options "-w" }
// Origin: r.spatschek@fz-juelich.de

class A
{
private:
  template <class T> void g(T t)  {}
  int i;
};

template <>
void A::g<int>(int t) { i = 1; } // { dg-error "" } private

int main()
{
  A a;
 
  a.g<int>(0); // { dg-error "" } private
}