ElementTypeOf

Members

Aliases

ElementTypeOf
alias ElementTypeOf = U
Undocumented in source.
ElementTypeOf
alias ElementTypeOf = AAElementType!(typeof(T.init.keys[0]), typeof(T.init.values[0]))
Undocumented in source.

Parameters

T

any array type

Return Value

If T is static or dynamic array, evaluates to single type which is the element type of that array. If T is an associative array, return templated struct with separate type aliases for Key and Value.

Examples

static assert (is(ElementTypeOf!(int[]) == int));
static assert (is(ElementTypeOf!(int[5]) == int));
static assert (is(ElementTypeOf!(int[][10]) == int[]));

alias ElementTypeOf!(double[int]) ElementType;
static assert (is(ElementType.Key == int));
static assert (is(ElementType.Value == double));

Meta