See this godbolt:

struct Foo
{
    Foo() noexcept = default;
    int t{};
};

struct Bar
{
    Foo baz{};
};

int main()
{
    return Bar
    {
        .baz = Foo{}
    }.baz.t;
}

When deleting noexcept, code for the constructor is auto-generated as expected. What gives?

0

There are 0 best solutions below