D-Programming-Language/phobos — pull request #451 by AndrejMitrovic (2012-02-22 18:42:55+00:00)
Title: Implement KeyType and ValueType for Associative Arrays in std.traits

This has been requested before in the newsgroups.
Closes Issue 7356 http://d.puremagic.com/issues/show_bug.cgi?id=7356.

Some people have requested these templates be named `KeyTypeOf` and `ValueTypeOf`, so they could be used in code like so:

KeyTypeOf!AA KeyType;

However I think this is a case of Hungarian notation (encoding "Type" shouldn't be necessary, it's obvious it's a type). You can always use `Key` and `Value` as the aliased type. Plus, `KeyType` is more consistent with `ReturnType` and similar templates.