gcc/testsuite/g++.dg/template/friend16.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: Wolfgang Bangerth <[email protected]> |
| 4 | |
| 5 | // PR c++/9602: Inline friend/pure virtual tree data sharing in |
| 6 | // class template. |
| 7 | |
| 8 | template <typename T> struct X { |
| 9 | void foo (X); |
| 10 | friend void bar () {} |
| 11 | }; |
| 12 | |
| 13 | template <typename T> |
| 14 | void X<T>::foo (X x) {} |
| 15 | |
| 16 | template struct X<int>; |