dmd 2.063 beta 5

Iain Buclaw ibuclaw at ubuntu.com
Thu May 23 08:10:08 PDT 2013


On Thursday, 23 May 2013 at 14:58:01 UTC, Steven Schveighoffer 
wrote:
> On Thu, 23 May 2013 10:16:13 -0400, Iain Buclaw 
> <ibuclaw at ubuntu.com> wrote:
>
>> On 23 May 2013 14:52, Steven Schveighoffer 
>> <schveiguy at yahoo.com> 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. =)


More information about the Digitalmars-d-announce mailing list