defaultKeyEqualPredOf

Default key equality/equivalence predicate for the type T.

Members

Manifest constants

defaultKeyEqualPredOf
enum defaultKeyEqualPredOf;
Undocumented in source.
defaultKeyEqualPredOf
enum defaultKeyEqualPredOf;
Undocumented in source.

Examples

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");

Meta