I am wondering about the following initialization scenario:
typedef struct {
char[2] array;
} MyStruct;
Class MyClass {
public:
Class() : _struct() {}
protected:
MyStruct _struct;
};
After looking at the rules of value and aggregate initialization in C++11, it seems to me that
MyClass class;
will lead to class._struct.array
being initialized with zeros in C++11. However, I was unable to find documentation about VS2013 in particular, showing that this is really guaranteed. Can anybody give a definite answer here?