How do I obtain the default hash of a user-defined struct

FreeSlave freeslave93 at gmail.com
Wed Apr 2 15:07:34 PDT 2014


Contents of struct are compared field by field using comparison 
for the type of each field. Dynamic arrays are compared by 
contents. If you want to compare them by pointer use .ptr 
property.

opEquals and opCmp are not about hashing, I believe. They are 
just operators to help when dealing with chaining when different 
objects have same hash (since hash may be not unique)


More information about the Digitalmars-d-learn mailing list