SharedPtr.toHash

Generate hash

Return: Address of payload as size_t

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

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

Meta