Function initializeAll

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

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

Parameters

NameDescription
Range Input range type
range Input range.

Example

import tanya.algorithm.comparison : equal;

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

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