Debian Codegraph @

gcc/testsuite/g++.dg/modules/using-25_b.C

raw
1 // { dg-additional-options "-fmodules-ts" }
2
3 import M;
4
5 int main() {
6 // These have been exported by using-decls and should be OK
7 auto a = A::Exposed_1;
8 auto b = B::Exposed_2;
9
10 // But we shouldn't have exposed the type names
11 A::E1 c; // { dg-error "not a member" }
12 B::E2 d; // { dg-error "not a member" }
13
14 // We also shouldn't have exposed any other enumerators
15 auto e = A::Hidden_1; // { dg-error "not a member" }
16 auto f = B::Hidden_2; // { dg-error "not a member" }
17 }