WAT: opCmp and opEquals woes

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 23 14:36:26 PDT 2014


On 7/23/14, 12:04 PM, H. S. Teoh via Digitalmars-d wrote:
> If autogenerating opEquals to be opCmp()==0 is a no-go, then I'd much
> rather say it should be a compile error if the user defines opCmp but
> not opEquals.

No. There is this notion of partial ordering that makes objects not 
smaller and not greater than others, yet not equal. -- Andrei


More information about the Digitalmars-d mailing list