I have this code for MS windows:
#include <windows.h>
#include <Shellapi.h>
#include <tchar.h>
#include <string>
void foo()
{
SHELLEXECUTEINFO shExInfo = {0};
}
According to this answer What Does {0} Mean in C++?
What's happening here is called aggregate initialization. Here is the (abbreviated) definition of an aggregate from section 8.5.1 of the ISO spec:
An aggregate is an array or a class with no user-declared constructors, no private or protected non-static data members, no base classes, and no virtual functions.
This code compiles ok however on MinGW 4.9 it throws:
warning: missing initializer for member '_SHELLEXECUTEINFOW::lpParameters' [-Wmissing-field-initializers]
for every single part of SHELLEXECUTEINFO struct
Why is that? Did something change in specs? Note: this code is c++11