staticArray

@safe @trusted
Unqual!T[n]
staticArray
(
T
size_t n
)
(
T[n] x...
)

Return Value

Type: Unqual!T[n]

statically (stack) allocated array with elements of type T of length n.

For more convenient usage alias it as `s' together with UFCS for the following convenient notation:

const x = [1, 2, 3].s;

TODO Replace with Phobos staticArray when dmd automatically does move for uncopyable T.

TODO Fix problems discussed here: http://forum.dlang.org/post/otrsanpgmokzpzqmfyvx@forum.dlang.org TODO File a bug report: http://forum.dlang.org/post/otrsanpgmokzpzqmfyvx@forum.dlang.org

TODO fix compiler so that move kicks in here automatically and remove special case on isCopyable

See Also

Meta