On Friday, 27 May 2016 at 09:18:47 UTC, Marc Schütz wrote:
You can do that with arrays, too, without causing allocations:assert(slice.length < static_array.length); slice = slice.ptr[0 .. slice.length+1];Of course that's unsafe, but your pointer magic certainly is, too.
Initial impressions suggest it's actually slower. The multiple dereferences to do it since it's a 2d array...