Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/desig20.C

raw
1 // PR c++/101405
2 // { dg-do compile { target c++20 } }
3
4 struct A {
5 int const a = 1;
6 int const b = 2;
7 };
8
9 struct B : A {
10 using A::a;
11 using A::b;
12 int const c = 3;
13 int const d = 4;
14 };
15
16 int main()
17 {
18 [[maybe_unused]] B b =
19 { .a = 10, .d = 42 }; // { dg-error "not a direct member" }
20 }