Denis Koroskin Wrote: > > void doSomething(inout(Object)[] a, inout(Object)[] b) { > > a[0] = b[0]; // works only when objects in both arrays have the > > same > > constness. > > } > > > > > > Doesn't work. > > doSomething("hello", "world");
Yes, one more level of indirection is needed: void doSomething(inout(T)[][] a, inout(T)[][] b){ a[0]=b[0]; } though it's subject to the const bug when you pass T[][] and immutable(T)[][] which is due to the current const system.