initializeAll

Initializes all elements of the range assuming that they are uninitialized.

@trusted
void
initializeAll
(
Range
)
(
Range range
)
if (
isInputRange!Range &&
hasLvalueElements!Range
)

Parameters

Range

Input range type

range Range

Input range.

Examples

import std.algorithm.comparison : equal;

int[2] actual = void;
const int[2] expected = [0, 0];

initializeAll(actual[]);
assert(equal(actual[], expected[]));

Meta