Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C

raw
1 // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2 // { dg-do compile { target c++20 } }
3
4 struct S {
5 constexpr S(int) {}
6 };
7
8 struct W {
9 constexpr W(int) : s(8), p() {}
10
11 S s;
12 int *p;
13 };
14
15 constexpr auto a = W(42);