1 // RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
21 } // end namespace PR61118
34 template <int val
> void f() {
35 constexpr Outer x
{.inner
= {val
}};
36 static_assert(x
.inner
.a
== val
);
39 void bar() { f
<4>(); }
59 U1 u
{.x
=2, // expected-note {{previous initialization is here}}
60 .y
=1}; // expected-error {{initializer partially overrides prior initialization of this subobject}}
61 new U2
{.x
= NonTrivial
{}, // expected-note {{previous initialization is here}}
62 .y
=1}; // expected-error {{initializer would partially override prior initialization of object of type 'NonTrivial' with non-trivial destruction}}