How do I make only the array itself immutable?

Marc jckj33 at gmail.com
Thu Mar 15 02:06:23 UTC 2018


Can I make it work?

>struct S
>{
>	int[] l;
>}

then

>auto s = S();
>s.l ~= 1; // ok
>s.l = []; // error


More information about the Digitalmars-d-learn mailing list