#include <iostream>
struct A
{
int i;
int j = 42;
A(int foo) : i(foo) {}
A() = default;
};
void non_array() {
}
int main() {
std::cout << "Compiler version: " << __VERSION__ << '\n';
{
// non-array case
A a{};
std::cout << "non-array:" << a.i << ' ' << a.j << '\n';
}
{
// array case
A foo[3] = {A(13), {}};
std::cout << "array (with {}): " << foo[1].i << ' ' << foo[1].j << '\n'
<< "array (without): " << foo[2].i << ' ' << foo[2].j << '\n';
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEEKewogICAgaW50IGk7CiAgICBpbnQgaiA9IDQyOwogICAgQShpbnQgZm9vKSA6IGkoZm9vKSB7fQogICAgQSgpID0gZGVmYXVsdDsKfTsKCnZvaWQgbm9uX2FycmF5KCkgewp9CgppbnQgbWFpbigpIHsKICAgIHN0ZDo6Y291dCA8PCAiQ29tcGlsZXIgdmVyc2lvbjogIiA8PCBfX1ZFUlNJT05fXyA8PCAnXG4nOwogICAgewogICAgICAgIC8vIG5vbi1hcnJheSBjYXNlCiAgICAgICAgQSBhe307CiAgICAgICAgc3RkOjpjb3V0IDw8ICJub24tYXJyYXk6IiA8PCBhLmkgPDwgJyAnIDw8IGEuaiA8PCAnXG4nOwogICAgfQogICAgewogICAgICAgIC8vIGFycmF5IGNhc2UKICAgICAgICBBIGZvb1szXSA9IHtBKDEzKSwge319OwogICAgICAgIHN0ZDo6Y291dCA8PCAiYXJyYXkgKHdpdGgge30pOiAiIDw8IGZvb1sxXS5pIDw8ICcgJyA8PCBmb29bMV0uaiA8PCAnXG4nCiAgICAgICAgICAgICAgICAgIDw8ICJhcnJheSAod2l0aG91dCk6ICIgPDwgZm9vWzJdLmkgPDwgJyAnIDw8IGZvb1syXS5qIDw8ICdcbic7CiAgICB9Cn0K