compile time opCall array assignment

Don nospam at nospam.com
Fri Feb 26 04:15:45 PST 2010


strtr wrote:
> Don Wrote:
> 
>> Because expressions of the form a.b[i]= c aren't yet supported in CTFE.
>> It will work in a couple of compiler releases from now.
> Only D2, or D1 as well?

Both.

> 
>> Workaround:
>> int[2] x;
>> x[0]=i1_;
>> x[1]=i2_;
>> res.arr=x;
>>
> :)


More information about the Digitalmars-d-learn mailing list