gcc/testsuite/g++.dg/modules/contracts-tpl-friend-1_a.C
raw| 1 | // { dg-additional-options "-fmodules-ts -fcontracts" } |
| 2 | |
| 3 | export module foo; |
| 4 | // { dg-module-cmi foo } |
| 5 | |
| 6 | void foo (int, void *); |
| 7 | void foo (float, void *); |
| 8 | |
| 9 | template <typename T> class TPL |
| 10 | { |
| 11 | friend void foo (T, void *); // { dg-warning "non-template function" } |
| 12 | |
| 13 | T member; |
| 14 | }; |
| 15 | |
| 16 | template class TPL<float>; // instantiate |
| 17 |