RcPtr.toHash

Generate hash

Return: Address of payload as size_t

struct RcPtr
@property @trusted scope const pure nothrow @nogc
size_t
toHash
()

Examples

{
    RcPtr!long x = RcPtr!long.make(123);
    RcPtr!long y = RcPtr!long.make(123);
    assert(x.toHash == x.toHash);
    assert(y.toHash == y.toHash);
    assert(x.toHash != y.toHash);
    RcPtr!(const long) z = x;
    assert(x.toHash == z.toHash);
}
{
    RcPtr!long x;
    RcPtr!(const long) y;
    assert(x.toHash == x.toHash);
    assert(y.toHash == y.toHash);
    assert(x.toHash == y.toHash);
}

Meta