According to the C++23 standard, what is the output of this program?
#include <iostream>
struct A {
A() { std::cout << "A"; }
};
struct B {
B() { std::cout << "B"; }
};
class C {
public:
C() : a(), b() {}
private:
B b;
A a;
};
int main()
{
C();
}What determines the order of member variable initialization?
BA
The initialization order of member variables is determined by their order of declaration, not their order in the initialization list.