gcc/testsuite/g++.old-deja/g++.pt/link1.C
raw| 1 | // { dg-do link } |
| 2 | // Origin: Mark Mitchell <[email protected]> |
| 3 | |
| 4 | template <class T> |
| 5 | int f(T); |
| 6 | |
| 7 | template <class T> |
| 8 | struct S { |
| 9 | template <class U> |
| 10 | friend int f(U) { return 0; } |
| 11 | }; |
| 12 | |
| 13 | int k = f(2); |
| 14 | |
| 15 | template <class T> |
| 16 | int g(T); |
| 17 | |
| 18 | int h = g(7); |
| 19 | |
| 20 | template <class T> |
| 21 | int g(T) { |
| 22 | S<T> si; |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | int main() |
| 27 | { |
| 28 | } |
| 29 |