aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/desig20.C
blob: 0ceda7ccabddea53ec89601a11423cc5f2cf8bc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/101405
// { dg-do compile { target c++20 } }

struct A {
  int const a = 1;
  int const b = 2;
};

struct B : A {
  using A::a;
  using A::b;
  int const c = 3;
  int const d = 4;
};

int main()
{
  [[maybe_unused]] B b =
  { .a = 10, .d = 42 };		// { dg-error "not a direct member" }
}