ndslice: convert a sliced object to T[]

Seb via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 14 20:17:39 PDT 2016


On Wednesday, 15 June 2016 at 03:11:23 UTC, data pulverizer wrote:
> in that case:
>
> import std.array : array;
> int[] x = slice.byElement.array;

Are you sure you want to create a _copy_ of your data? In most 
cases you don't need that ;-)

> thanks, now I can go to bed!

You are welcome. Sleep tight!


More information about the Digitalmars-d-learn mailing list