How do you overload opEquals?

Adam D. Ruppe destructionator at gmail.com
Tue Nov 19 13:05:22 PST 2013


On Tuesday, 19 November 2013 at 20:59:31 UTC, Dale Matthews wrote:
> I feel like I'm missing something simple.

opEquals doesn't work on classes with class references. It 
doesn't call a method with obj = other_obj, it just rebinds the 
reference. If you want full control over opEquals, it'll have to 
be a struct instead of class.



More information about the Digitalmars-d-learn mailing list