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
{
    @safe pure nothrow @nogc:
    this(int x)
    {
        this.x = x;
    }
    @property bool opEquals(const scope typeof(this) rhs) const
    {
        return 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