Get AA key and value type
Pierre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 19 05:50:49 PDT 2015
Hi everybody,
I would like to extract key and value type from AA.
I found this answer on forum :
template AATypes(T)
{
// todo: static assert if T is no AA type here
alias ArrayElementType!(typeof(T.keys)) key;
alias ArrayElementType!(typeof(T.values)) value;
}
But compiler failed,I think T need to be a value in order to get
keys and values attributes.
So how can I get types without instance ?
Thanks for help.
More information about the Digitalmars-d-learn
mailing list