[Issue 18678] std.datetime.date.TimeOfDay has opCmp but no toHash

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 28 17:16:17 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18678

--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
(In reply to Jonathan M Davis from comment #1)
> Why does it matter if opCmp is defined and not toHash? It's if opEquals is
> defined that toHash is required, not opCmp.

If opCmp is defined but opEquals isn't, doesn't DMD re-write `val == val` to
`val.opCmp(val) == 0`?

--


More information about the Digitalmars-d-bugs mailing list