xxxxxxxxxx
import std;
void main()
{
}
class ExampleC
{
int x;
this (int x)
{
this.x = x;
}
override bool opEquals(Object o) const
{
if (ExampleC rhs = cast(ExampleC)o) {
return this.x == rhs.x;
}
return false;
}
}
unittest
{
auto c = new ExampleC(1);
assert(c != new ExampleC(23));
}