gcc/testsuite/g++.old-deja/g++.pt/recursion2.C
raw| 1 | // { dg-do run } |
| 2 | template< int i > struct T : |
| 3 | public T< i-1 > |
| 4 | { |
| 5 | }; |
| 6 | |
| 7 | template<> struct T< 0 > |
| 8 | { |
| 9 | }; |
| 10 | |
| 11 | template< class F > struct T1 : |
| 12 | public T< F::dim > |
| 13 | { |
| 14 | }; |
| 15 | |
| 16 | template< int i > struct S |
| 17 | { |
| 18 | enum { dim = i } ; |
| 19 | }; |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | T1< S< 4 > > t ; |
| 24 | return( 0 ) ; |
| 25 | } |
| 26 |