aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C
blob: cd5f701f20fcbfbb3ab759a298ab5bd1004f960e (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
// Adapted from testcase by Oskar Enoksson <osken393@student.liu.se>

extern "C" void abort();

template<class T0>
class A {
public:
  typedef T0 T;
};

template<int K>
class B {
  typedef A<char[K]> BC;
};

template<int N, int M>
class C { 
public:
  typedef A<char[M]> AC;
};

int main() {
  if (sizeof(C<3,7>::AC::T) != 7) 
    abort();
}