staticArray

Create a static array literal without any heap allocation.

staticArray() automatically deduces its type from the arguments, while staticArrayOf() lets you specify the type explicitly.

  1. CommonType!(T)[T.length] staticArray(T elements)
    @safe pure nothrow
    CommonType!(T)[T.length]
    staticArray
    (
    T...
    )
    if (
    !is(CommonType!T == void)
    )
  2. T[U.length] staticArrayOf(U elements)

Meta