I'd like to make a compile-time constant associative array mapping a list of types to an integer:
int[??] typemap; typemap[(int,float)] = 1; typemap[(long,double)] = 2; ... int t = typemap[(int,float)]; I tried playing with std.typetuple but no luck. I can get halfway there with a function template, but then I can't iterate over the keys or values. Is there a way to do something like this in D? More generally, is there a way to store a type in a variable? Thanks.
