why no implicit convertion?

Tomek Sowiński just at ask.me
Wed Nov 17 13:44:31 PST 2010


Dnia 17-11-2010 o 22:32:21 Tomek Sowiński <just at ask.me> napisał(a):

>> What's best to pass such multidimensional arrays?
>
>  Good question. Maybe new char[][](4) and point the inner arrays to the  
> chunks of the static array?

Correction, it can be allocated on the stack:

     char[4][4] b;
     char[][4] helper;
     foreach (i, ref chunk; helper)
         chunk = b[i];
     bar(helper); // ok, implicitly converted

-- 
Tomek


More information about the Digitalmars-d-learn mailing list