HashTable.empty

Tells whether the container contains any elements.

struct HashTable(Key, Value, alias hasher = hash)
@property const
bool
empty
()
if (
isHashFunction!(hasher, Key)
)

Return Value

Type: bool

Whether the container is empty.

Examples

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

Meta