KeyType, ValueType traits for hashes

Andrej Mitrovic andrej.mitrovich at
Tue Jan 24 16:24:59 PST 2012

Unfortunately you would have to do that with every template in order
to be consistent, and that's too much work. The real improvement would
be for the compiler to let us know *which* of the constraints failed,

alias KeyType!(int[]) Key;

Error: Can't instantiate KeyType!(int) due to failed constraint: if

I don't know if there's an actual enhancement request for this but I
think it was probably discussed before.

More information about the Digitalmars-d-learn mailing list