Assignment of shared values

via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 7 05:45:10 PDT 2014


On Thursday, 7 August 2014 at 12:25:09 UTC, Dicebot wrote:
> On Wednesday, 6 August 2014 at 23:01:11 UTC, Andrei 
> Alexandrescu wrote:
>> Somewhat sadly, this code does compile:
>>
>> shared S s1, s2;
>> s1 = s2;
>
> I have no idea what semantics this may have from just reading 
> the snippet. IMHO killing it will be a good thing and totally 
> in line with your comments about shared you have made during 
> DConf conversations.

Should it be allowed if `S` defines `opAssign`?


More information about the Digitalmars-d mailing list