class C { pure nothrow @safe @nogc: this(int x) { this.x = x; } @property bool opEquals(in typeof(this) rhs) const => x == rhs.x; @property override bool opEquals(const scope Object rhs) const @trusted { C rhs_ = cast(C)rhs; return rhs_ && x == rhs_.x; } int x; } static assert(defaultKeyEqualPredOf!(C) == "a is b");
Default key equality/equivalence predicate for the type T.