HashTable.this

Constructs the hash table from a forward range.

Parameters

R

Range type.

range R

Forward range.

allocator Allocator

Allocator.

Precondition: allocator !is null.

Examples

alias KeyValue = HashTable!(string, int).KeyValue;

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

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

Meta