struct Foo {
A a; // has innards that depend on b, taken in as a reference to b
C c; // some other object that uses b
B b;
Foo()
: a(b), c()
{}
};
gcc 15.2.1
clangd 20.1.8
Just surprised I didn't get any warnings before it crashed trying to use a b that wasn't fully constructed. Thought this would be an easy one for the compiler?