KeyType

Get the Key type of an Associative Array.

alias KeyType(V : V[K], K) = K

Examples

alias Hash = int[string];
static assert(is(KeyType!Hash == string));
static assert(is(ValueType!Hash == int));
KeyType!Hash str = "a"; // str is declared as string
ValueType!Hash num = 1; // num is declared as int

Meta