constant pointer failing to compile

Josh Holtrop jholtrop at gmail.com
Thu Apr 6 12:18:48 UTC 2023


On Thursday, 6 April 2023 at 00:59:12 UTC, Mathias LANG wrote:
>> immutable ubyte[4] data = [1, 2, 3, 4];
>
> Using a static array instead of a slice will do the trick. You 
> can leave the `__gshared` if you want, but it is redundant on a 
> global, initialized `immutable` variable.

Yes, thank you, using static arrays did work. And thanks for the 
note on __gshared as well.


More information about the Digitalmars-d-learn mailing list