The OpenD Programming Language

BigInt.toHash

struct BigInt
const @safe pure nothrow @nogc
size_t
toHash
()

Return Value

Type: size_t

A unique hash of the BigInt's value suitable for use in a hash table.

Examples

toHash is rarely directly invoked; it is implicitly used when BigInt is used as the key of an associative array.

string[BigInt] aa;
aa[BigInt(123)] = "abc";
aa[BigInt(456)] = "def";

assert(aa[BigInt(123)] == "abc");
assert(aa[BigInt(456)] == "def");

Meta