[Issue 13179] AA key type TagIndex now requires equality rather than comparison

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 21 14:05:24 PDT 2014


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

bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc

--- Comment #3 from bearophile_hugs at eml.cc ---
(In reply to Kenji Hara from comment #2)

> If TagIndex is used for AA keys, compiler cannot determine which is the
> intended 'equality', t1 == t2 or t1.opCmp(t2) == 0.

opCmp includes an equality, this means the programmer has defined an equality
too. So can't we assume that the equality is "t1.opCmp(t2) == 0" when the user
defines just opCmp?

--


More information about the Digitalmars-d-bugs mailing list