Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/using3.C

raw
1 // Test for P0195R2 multiple using.
2 // { dg-options "" }
3
4 namespace A {
5 int i;
6 }
7
8 namespace A1 {
9 using A::i, A::i; // OK: double declaration
10 // { dg-warning "comma" "" { target c++14_down } .-1 }
11 }
12
13 struct B {
14 int i;
15 };
16
17 struct X : B {
18 using B::i, B::i; // { dg-error "redeclaration" }
19 // { dg-warning "comma" "" { target c++14_down } .-1 }
20 };