HashTable.this

Initializes the hash table from a static array.

Parameters

n

Array size.

array KeyValue[n]

Static array.

allocator Allocator

Allocator.

Precondition: allocator !is null.

Examples

alias KeyValue = HashTable!(string, int).KeyValue;
auto hashTable = HashTable!(string, int)([KeyValue("one", 1), KeyValue("two", 2)]);

assert(hashTable["one"] == 1);
assert(hashTable["two"] == 2);

Meta