gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C
raw| 1 | // { dg-do link } |
| 2 | // Origin: Mark Mitchell <[email protected]> |
| 3 | |
| 4 | template <int n> struct A { |
| 5 | template <class T> A (T t); |
| 6 | template <class T> int f(T t) const; |
| 7 | }; |
| 8 | |
| 9 | template <> template<class T> int A<1>::f(T t) const {return 1;} |
| 10 | template <> template<class T> A<1>::A (T t) {} |
| 11 | |
| 12 | int main() { |
| 13 | A<1> a (3); |
| 14 | a.f(1); |
| 15 | return 0; |
| 16 | } |