June 19, 2011 struct as dictionary key | ||||
---|---|---|---|---|
| ||||
I am creating a struct that I want to use as dictionary (associative array) key Initially it was a class and I overrode toHash and opCmp. I just made it a struct to be more lightweight on the system, but can't "override" toHash anymore! How can I make it a good dictionary key? Here is the struct struct PropertyId { TypeInfo declaringType; /// ditto string propertyName; /// ditto } |
June 19, 2011 Re: struct as dictionary key | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lloyd Dupont | Never mind, just found it! http://www.digitalmars.com/d/2.0/hash-map.html |
Copyright © 1999-2021 by the D Language Foundation