opEquals optimized away?

Manfred Nowak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 5 16:30:50 PDT 2015


On Tuesday, 5 May 2015 at 05:26:17 UTC, anonymous wrote:

> because `c is c`

Thanks. One can see this documented in
   http://dlang.org/operatoroverloading.html#equals

But
1: how can one override this behavior
2: what is the design reason for this

Especially: how can one implement side effects on invoking `==' 
or `!='?

-manfred


More information about the Digitalmars-d-learn mailing list