ArrayElementType

Indicates the array element type of an array.

Contrary to ElementType, dchar is not returned for narrow strings. The template strips the type lookup goes until the last dimenssion of a multi-dim array.

template ArrayElementType (
T
) if (
isArray!T
) {}

Parameters

T

type to be tested.

Return Value

T element type.

Examples

static assert(is(ArrayElementType!(int[][]) == int));
static assert(is(ArrayElementType!(char[][][][][]) == char));
static assert(is(ArrayElementType!(wchar[]) == wchar));

Meta