Associative arrays, opCmp, opEquals and toHash in 2.066.0-b4
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 21 12:02:39 PDT 2014
On 2014-07-21 20:17, H. S. Teoh via Digitalmars-d wrote:
> I'm inclined to say, file a regression bug. If opCmp is defined but
> opEquals isn't, the compiler should auto-generate opEquals (as
> opCmp(...)==0). Requiring the user to implement a separate opEquals
> when opCmp is already there is nonsensical, and opens the door to stupid
> bugs due to increased boilerplate. (Of course, if the user also defines
> opEquals manually, that's fine. But if he doesn't, the compiler should
> do the Right Thing(tm).)
Filed as https://issues.dlang.org/show_bug.cgi?id=13179
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list