#include <iostream>
// POD
struct foo1 {
bool a = true;
bool b;
};
// not POD
struct foo2 {
bool a = true;
bool b;
std::string c;
};
int main()
{
{
foo1 bar;
std::cout << "foo1: " << bar.a << " "<< bar.b << std::endl;
}
{
foo2 bar;
std::cout << "foo2: " << bar.a << " "<< bar.b << std::endl;
}
{
foo2 bar = {};
std::cout << "foo2 = {}: " << bar.a << " "<< bar.b << std::endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKLy8gUE9ECnN0cnVjdCBmb28xIHsKICAgIGJvb2wgYSA9IHRydWU7CiAgICBib29sIGI7CiB9OwogCi8vIG5vdCBQT0QKc3RydWN0IGZvbzIgewoJYm9vbCBhID0gdHJ1ZTsKCWJvb2wgYjsKCXN0ZDo6c3RyaW5nIGM7Cn07CgogCiBpbnQgbWFpbigpCiB7CiAJewogCQlmb28xIGJhcjsKICAgIAlzdGQ6OmNvdXQgPDwgImZvbzE6ICIgPDwgYmFyLmEgPDwgIiAiPDwgYmFyLmIgPDwgc3RkOjplbmRsOwogCX0KIAl7CiAJCWZvbzIgYmFyOwogICAgCXN0ZDo6Y291dCA8PCAiZm9vMjogIiA8PCBiYXIuYSA8PCAiICI8PCBiYXIuYiA8PCBzdGQ6OmVuZGw7CiAJfQogCXsKIAkJZm9vMiBiYXIgPSB7fTsKICAgIAlzdGQ6OmNvdXQgPDwgImZvbzIgPSB7fTogIiA8PCBiYXIuYSA8PCAiICI8PCBiYXIuYiA8PCBzdGQ6OmVuZGw7CiAJfQogCQogICAgIHJldHVybiAwOwogfQ==