How to get hash value of an object?

Seb via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 11 12:10:07 PST 2016


On Sunday, 4 December 2016 at 13:17:09 UTC, Era Scarecrow wrote:
> On Tuesday, 29 November 2016 at 00:05:31 UTC, Steven 
> Schveighoffer wrote:
>> hashOf is kind of this horrible hacky thing that nobody should 
>> be using. It literally takes whatever you pass it and hashes 
>> the local bytes.
>
>  Ugg... Anything with pointers, classes or arrays will have 
> huge problems with consistency; While anything with fixed 
> static arrays or pure value-types will result in proper values.

For the record: it was a regression and has been fixed with 
https://github.com/dlang/druntime/pull/1707 and thus should be 
part of the next point release.


More information about the Digitalmars-d-learn mailing list