toStaticArray1

@trusted
inout(T.Types[0])[T.length]
toStaticArray1
(
T
)
(
inout T tup
)

Return Value

Type: inout(T.Types[0])[T.length]

tuple tup to a static array.

Examples

import std.typecons: tuple;
const auto tup = tuple("a", "b", "c", "d");
const string[4] arr = ["a", "b", "c", "d"];
static assert(is(typeof(tup.toStaticArray1()) == typeof(arr)));
assert(tup.toStaticArray1() == arr);

See Also

Meta