Static initialization of rectangular arrays
kinke
noone at nowhere.com
Thu Aug 29 19:06:04 UTC 2019
On Thursday, 29 August 2019 at 18:59:22 UTC, kinke wrote:
> On Thursday, 29 August 2019 at 18:11:50 UTC, Les De Ridder
> wrote:
>> It's a known bug[1].
>>
>> As a workaround you could use a `static this()`:
>
> Or LDC, and GDC probably too.
Sorry, that was wrt. the linked bugzilla and not this example
here. - What does work is `static double[6][3] matrix = [0, 0,
0]`, i.e., initializing each nested 1D array with a scalar 0.
More information about the Digitalmars-d-learn
mailing list