On Tue, Feb 3, 2009 at 11:51 AM, nobody <someb...@somewhere.com> wrote: > Would you also happen to know why the following gives an error? > > arr[1] = arr[$-1]; // main.d(11): Error: cannot assign to static array
arr[1][] = arr[$-1][]; You cannot reassign what fixed-size array references point to, but you can copy their contents. If this were an int[][], you would still probably want to do "arr[1][] = arr[$ - 1][]", since doing "arr[1] = arr[$ - 1]" would make arr[1] and arr[$ - 1] point to the same data; probably not what you would expect.