Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.pt / parms1.C
blobb8a5dda1cb3011cf85386c6dff7be55f9f376c72
1 // { dg-do run  }
2 // Testcase for use of template parms as types for other template parms.
4 template <class T, T t>
5 class A {
6     T   a;
7 public:
8     A(): a(t) {}
10     operator T () { return a; }
13 template <class S, S s>
14 class B {
15     A<S,s> a;
16 public:
17     B(A<S,s>& b): a(b) {}
19     operator S () { return a*20; }
22 int
23 main()
25     A<int, 5> a;
26     B<int, 5> b(a);
28     if (b * a == 500)
29       return 0;
30     else
31       return 1;