List.build

Static function which return List construct from arguments args.

  1. typeof(this) build(Args args)
  2. typeof(this) build(AllocatorType allocator, Args args)
    struct List
    static
    typeof(this)
    build
    (
    Args...
    )
    (,
    auto ref Args args
    )

Examples

import std.range : only;

int[2] tmp = [3, 4];
auto list = List!(int).build(1, 2, tmp[], only(5, 6), List!(int).build(7, 8));
assert(list == [1, 2, 3, 4, 5, 6, 7, 8]);

Meta