How do I obtain the default hash of a user-defined struct
dnspies
dspies at ualberta.ca
Wed Apr 2 23:49:19 PDT 2014
On Wednesday, 2 April 2014 at 22:07:36 UTC, FreeSlave wrote:
> 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)
Thanks, I'll post the other questions in separate threads.
More information about the Digitalmars-d-learn
mailing list