Function HashTable.byValue

Returns a bidirectional range that iterats over the values of this HashTable.

HashTable.ByValue byValue();

HashTable.ConstByValue byValue() const;

Returns

A bidirectional range that iterates over the values of the container.

See Also

byKey.

Example

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

auto byValue = hashTable.byValue();
assert(!byValue.empty);

assert(byValue.front == 1 || byValue.front == 2);
assert(byValue.back == 1 || byValue.back == 2);
assert(byValue.front != byValue.back);

byValue.popFront();
assert(byValue.front == byValue.back);

byValue.popBack();
assert(byValue.empty);
}