Manfred_Nowak <svv1999 at hotmail.com> wrote: > Sergey Gromov wrote: > > > You can always use > > return cast(T[])mem; > > I doubt this, because that `cast' might not be valid for all types `T'. Could you explain your point in a bit more detail? std.gc.malloc() is guaranteed to return a memory block with alignment requirements sufficient for any type.