Duplicates slice.
GC-allocated Contiguous immutable slice.
import mir.ndslice; auto x = 3.iota!int; Slice!(int*) mut = x.dup; Slice!(immutable(int)*) imm = mut.idup; assert(imm == x); assert(mut == x);
.Slice.dup
See Implementation
Duplicates slice.