WAT: opCmp and opEquals woes

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 15 05:49:53 PDT 2014


Am Wed, 15 Oct 2014 11:25:10 +0000
schrieb "Martin Nowak" <code at dawg.eu>:

> On Wednesday, 23 July 2014 at 21:14:35 UTC, Brian Schott wrote:
> > $ ./dscanner --styleCheck ~/tmp/test.d
> > test.d(1:8)[warn]: 'A' has method 'opCmp', but not 'opEquals'.
> 
> Nice

Yep! Some say opCmp is something entirely different from
opEquals. One creates an order between two objects while the
other tests for equality. I always had the idea that opCmp
supersedes opEquals. What dscanner does is probably the only
sane way out :)

-- 
Marco



More information about the Digitalmars-d mailing list