fill

Fills range with value.

void
fill
(
Range
Value
)
(
Range range
,
auto ref Value value
)
if (
isInputRange!Range &&
isAssignable!(ElementType!Range, Value)
)

Parameters

Range

Input range type.

Value

Filler type.

range Range

Input range.

value Value

Filler.

Examples

import std.algorithm.comparison : equal;

int[6] actual;
const int[6] expected = [1, 1, 1, 1, 1, 1];

fill(actual[], 1);
assert(equal(actual[], expected[]));

Meta