gcc/testsuite/g++.dg/modules/namespace-3_a.C
raw| 1 | // Check namespace needed only by internal reference is not made visible |
| 2 | // { dg-additional-options "-fmodules-ts" } |
| 3 | |
| 4 | export module frob; |
| 5 | // { dg-module-cmi frob } |
| 6 | |
| 7 | namespace silent |
| 8 | { |
| 9 | namespace inner |
| 10 | { |
| 11 | static int X () |
| 12 | { |
| 13 | return 1; |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | export int f (int y) |
| 19 | { |
| 20 | return y + silent::inner::X (); |
| 21 | } |