On Thursday, 23 May 2013 at 14:58:01 UTC, Steven Schveighoffer
wrote:
On Thu, 23 May 2013 10:16:13 -0400, Iain Buclaw
<[email protected]> wrote:
On 23 May 2013 14:52, Steven Schveighoffer
<[email protected]> wrote:
Adding an initializer simply changes the default value from 0
to whatever
you want. It's quite consistent IMO.
Don't think it makes sense in non-POD structs...
Haven't tested, but is this an error?
struct S
{
const int;
this (int x)
{
this.x = x; // here
}
}
S(5);
Well, since you didn't name the member, it didn't compile right
off :)
Yeah... I've had little sleep so I'm not with it. =)