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);
See Implementation