This is actually allowed in C ++ 14.
struct s
{
int i=0;
};
int main() {
s s1;
s s2 = {42};
}
Your compiler probably just doesn't implement the new rule in C ++ 14. However, the latest version of clang accepts this and does the right thing in C ++ 14 mode.
++ 11, , . , PoD, . , . , , , ++ 14 .