HashTable.clear

Removes all elements.

struct HashTable(Key, Value, alias hasher = hash)
void
clear
()
if (
isHashFunction!(hasher, Key)
)

Examples

HashTable!(string, int) hashTable;
hashTable["five"] = 5;
assert(!hashTable.empty);
hashTable.clear();
assert(hashTable.empty);

Meta