Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-90383-1.C

raw
1 // PR c++/90383
2 // { dg-do compile { target c++14 } }
3
4 struct alignas(8) A { constexpr A (bool x) : a(x) {} A () = delete; bool a; };
5 struct B { A b; };
6
7 constexpr bool
8 foo ()
9 {
10 B w{A (true)};
11 w.b = A (true);
12 return w.b.a;
13 }
14
15 static_assert (foo (), "");