KeyType, ValueType traits for hashes
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Jan 23 22:53:58 PST 2012
The only issue I have with this is the isAssociativeArray constraint.
That template uses __traits(isAssociativeArray, T), which returns
FALSE for DCollection's HashMap type. It would be a shame if you
couldn't define a drop-in replacement to builtin hashes with your own
implementation, seeing as such a type wouldn't work with functions in
Phobos that take a hash (actually right now very few functions in
Phobos do take a hash, if any..).
More information about the Digitalmars-d-learn
mailing list