WAT: opCmp and opEquals woes
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 23 11:48:42 PDT 2014
On 7/23/14, 9:45 AM, H. S. Teoh via Digitalmars-d wrote:
> Why isn't "a==b" rewritten as "a.opCmp(b)==0"?? I'm pretty sure TDPL
> says this is the case (unfortunately I'm at work so I can't check my
> copy of TDPL).
>
> https://issues.dlang.org/show_bug.cgi?id=13179
>
> :-(
It's a good decision. There are types that are comparable for equality
but not compared for ordering. -- Andrei
More information about the Digitalmars-d
mailing list