On Friday, 10 March 2017 at 16:08:05 UTC, DRex wrote:
Am I missing something here?

Yeah, you need to implement a custom equality operator.

class A {
   int member;
   override bool opEquals(const A rhs) {
return this.member == rhs.member; // and other members that need to be equal
   }
}


The default opEquals sees if they are the same *instance* (same as `a is b`), and does not look at contents. You need to define that yourself.

Reply via email to