Bug 18679 – std.complex.opEquals has opEquals but no toHash

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-28T13:19:07Z
Last change time
2021-04-25T19:25:08Z
Assigned to
No Owner
Creator
Jack Stouffer
Blocks
17206

Comments

Comment #0 by jack — 2018-03-28T13:19:07Z
Comment #1 by vasniktel — 2019-03-07T15:29:15Z
I'm wondering whether `hashOf(this.im, hashOf(this.re))` is sufficient for this task.
Comment #2 by n8sh.secondary — 2019-04-02T21:06:48Z
Vasyl Teliman: it is sufficient, which indicates that we don't actually need a custom `toHash` here and the auto-generated hash for structs is sufficient.
Comment #3 by ibuclaw — 2021-04-25T19:25:08Z
I will close this because you can use `c.hashOf()` instead, as per last comment.