Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi9.C

raw
1 // PR c++/94470
2 // { dg-do compile { target c++14 } }
3
4 struct Y
5 {
6 int a;
7 };
8
9 struct X
10 {
11 Y b = (c={5});
12 Y c = (b={1});
13 };
14
15 constexpr X o = { };
16 static_assert(o.b.a == 1 && o.c.a == 1, "");