gcc/testsuite/g++.dg/modules/using-17_a.C
raw| 1 | // PR c++/114867 |
| 2 | // { dg-additional-options "-fmodules-ts -Wno-global-module" } |
| 3 | // { dg-module-cmi M } |
| 4 | |
| 5 | module; |
| 6 | |
| 7 | namespace ns { |
| 8 | template <typename T> void f(T); |
| 9 | |
| 10 | namespace inner { |
| 11 | class E {}; |
| 12 | int f(E); |
| 13 | } |
| 14 | using inner::f; |
| 15 | } |
| 16 | |
| 17 | export module M; |
| 18 | |
| 19 | template <typename T> |
| 20 | struct X { |
| 21 | void test() { ns::f(T{}); } |
| 22 | }; |
| 23 | template struct X<int>; |
| 24 | |
| 25 | export namespace ns { |
| 26 | using ns::f; |
| 27 | } |
| 28 | |
| 29 | export auto get_e() { |
| 30 | return ns::inner::E{}; |
| 31 | } |