uninitializedFillDefault

version(HasDRuntime)
nothrow @nogc
T[]
uninitializedFillDefault
(
T
)
(
T[] array
)

Examples

static struct S { int x = 42; @disable this(this); }

int[5] expected = [42, 42, 42, 42, 42];
S[5] arr = void;
uninitializedFillDefault(arr);
assert((cast(int*) arr.ptr)[0 .. arr.length] == expected);

Meta