Comparing Instances of Classes

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 10 08:30:00 PST 2017


On Friday, 10 March 2017 at 16:22:18 UTC, DRex wrote:
> Error: function app.A.opEquals does not override any function, 
> did you mean to override 'object.Object.opEquals'?

Oh sorry, maybe I messed up the const. Try:

override bool opEquals(A rhs) { ... }


and if the compiler still complains change the A to Object and 
cast it inside (but I'm pretty sure that will work, I think it is 
just const it is picky about)


More information about the Digitalmars-d-learn mailing list