An input range that exposes references to its elements and has assignable elements
import core.stdc.stdlib : malloc, free; struct S { int a = 10; } auto s = (cast(S*) malloc(5 * S.sizeof))[0 .. 5]; initializeAll(s); assert(s == [S(10), S(10), S(10), S(10), S(10)]); scope(exit) free(s.ptr);
Initializes all elements of range with their .init value. Assumes that the elements of the range are uninitialized.
This function is unavailable if T is a struct and T.this() is annotated with @disable.