struct A
{
private:
int a, b, c;
};
int main()
{
A a1{};
A a2 = {};
return 0;
}
The code was compiled by VC++ 2012 (with the latest update "Nov 2012 CTP").
I expect a1 and a2 are zero-initialized, but not. a1 and a2 are not initialized.
Why?
You mean Microsoft's Community Tech Preview compiler, which they aren't even confident enough in to call it a beta, has bugs in it? ;)
This is a bug; it should behave as you expect. Please report it as such.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With