Function SharedPtr.toHash
Generate hash
size_t toHash() const pure nothrow @nogc @property scope @trusted;
Return
Address of payload as size_t
Examples
{
SharedPtr!long x = SharedPtr!long .make(123);
SharedPtr!long y = SharedPtr!long .make(123);
assert(x .toHash == x .toHash);
assert(y .toHash == y .toHash);
assert(x .toHash != y .toHash);
SharedPtr!(const long) z = x;
assert(x .toHash == z .toHash);
}
{
SharedPtr!long x;
SharedPtr!(const long) y;
assert(x .toHash == x .toHash);
assert(y .toHash == y .toHash);
assert(x .toHash == y .toHash);
}