On Friday, 24 May 2013 at 13:46:49 UTC, Steven Schveighoffer
wrote:
This was ALWAYS the case.
struct S
{
int x = 5; // sets S.init.x to 5
}
As far as I understand Don, this behavior should be considered
misleading too, it does not matter if variable is const or not.
And that does have some sense, because you have initializer
syntax which does not really initialize anything on its own,
contrary to very same initializer syntax used with variable.
There is an option to prohibit initializers for struct member
declarations at all and allow CTFE-able default constructors
instead, but that would have been a major change.
It does not change the fact that old behavior was completely
broken beyond imagination though.