On 04/22/2017 01:51 PM, XavierAP wrote:
> I can do:
>
> int[3] arr = void;
> arr[] = 1;
>
> But apparently I can't do:
>
> int[3][4] arr = void;
> arr[][] = 1;
>
> What is the best way? What am I missing?

It took me a while to convince myself that there is no bug here. The problem, as is obvious to others, ;) a whole slice of a whole slice is still the same slice. So it's not possible to go deeper into the element slices. Here is a proof with a simple array:

    int[] a;
    static assert(is(typeof(a[]) == typeof(a[][][][])));

Ali

Reply via email to