Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr19.C

raw
1 // PR c++/100252
2 // { dg-do compile { target c++14 } }
3
4 #define SA(X) static_assert ((X),#X)
5
6 struct A {
7 const A* p = this;
8 };
9
10 struct B {
11 A a = (A{}, A{});
12 };
13
14 constexpr B b;
15 SA(b.a.p == &b.a);
16
17 struct C {
18 int x;
19 int y = x;
20 };
21
22 struct D {
23 int x = 0;
24 int y = (C{x}.y, C{x}.y);
25 };
26
27 constexpr D d = { };
28 D d2 = {};