gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | template <int i> class a |
| 4 | { |
| 5 | public : |
| 6 | int k; |
| 7 | |
| 8 | template <int j> int f() const { return this->f<j-1>(); } |
| 9 | |
| 10 | int g() const { return f<i>(); } |
| 11 | }; |
| 12 | |
| 13 | template <> |
| 14 | template <> |
| 15 | int a<2>::f<0>() const { |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | a<2> x; |
| 22 | return x.g(); |
| 23 | } |
| 24 |