← Back to index
|
Original Bugzilla link
Bug 18767 – __xtoHash memberwise hashing shouldn't just sum the member hashes
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-16T21:37:48Z
Last change time
2018-04-17T07:07:45Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0
by n8sh.secondary — 2018-04-16T21:37:48Z
Currently: ``` const(char)* code = "size_t h = 0;" ~ "foreach (i, T; typeof(p.tupleof))" ~ " h += typeid(T).getHash(cast(const void*)&p.tupleof[i]);" ~ "return h;"; ```
Comment #1
by n8sh.secondary — 2018-04-16T22:39:21Z
Pull request:
https://github.com/dlang/druntime/pull/2166
Comment #2
by github-bugzilla — 2018-04-17T07:07:44Z
Commits pushed to master at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/2f13c2d416490fdb5e62c0d296e42b76c5c02388
Fix Issue 18767 - __xtoHash memberwise hashing shouldn't just sum the member hashes
https://github.com/dlang/dmd/commit/f4c0c6579b8bca9af003f7221c9a99f241b7fea8
Merge pull request #8175 from n8sh/issue-18767-xtoHash Fix Issue 18767 - __xtoHash memberwise hashing shouldn't just sum the member hashes merged-on-behalf-of: Walter Bright <
[email protected]
>