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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Oct 15 10:28:12 PDT 2014


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

--- Comment #33 from Martin Nowak <code at dawg.eu> ---
(In reply to hsteoh from comment #22)
> Instead, Jonathan's solution is the best: get rid of the compile error that
> forces you to declare opEquals just because you declared opCmp. Code that
> defines opCmp that's inconsistent with opEquals is already broken, and we
> aren't making things worse. Assuming that the user-defined opCmp is
> consistent with opEquals, then the AA code change that switched from using
> typeinfo.compare to typeinfo.equals should still work correctly on existing
> code. So this sounds like the best way to go.

So is this the bottom line of the discussion?
And are we OK that this change might silently break code that was previously
incorrect but did work?

--


More information about the Digitalmars-d-bugs mailing list