Is Key Type?

Xinok via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 2 10:55:14 PDT 2015


is there a trait in D or Phobos which will tell you if a type can 
be used as a key for an associative array? For example, where T 
is some type:

     static assert(isKeyType!T)
     int[T] hashTable = ...


More information about the Digitalmars-d-learn mailing list