unique

Constructs a new array with size elements and wraps it in a $(D_PSYMBOL Unique).

  1. Unique!T unique(Allocator allocator, A args)
  2. Unique!T unique(Allocator allocator, size_t size)
    @trusted
    unique
    (
    T : E[]
    E
    )
    (,
    size_t size
    )

Parameters

T

Array type.

E

Array element type.

size size_t

Array size.

allocator Allocator

Allocator.

Return Value

Type: Unique!T

Newly created $(D_PSYMBOL Unique!T).

Precondition: allocator !is null && size <= size_t.max / E.sizeof

Meta