Function Vector.build
Static function which return Vector
construct from arguments args
.
typeof(this) build(Args...)
(
auto ref Args args
);
typeof(this) build(Args...)
(
Vector . AllocatorType allocator,
auto ref Args args
);
Parameters
allocator
exists only if template parameter _Allocator
has state.
args
values of type ElementType
, input range or Vector
.
Examples
import std .range : only;
auto vec = Vector!(int, 6) .build(1, 2, [3, 4], only(5, 6), Vector!(int, 10) .build(7, 8));
assert(vec == [1, 2, 3, 4, 5, 6, 7, 8]);