HashTable.bucketCount

Returns current bucket count in the container.

Bucket count equals to the number of the elements can be saved in the container in the best case scenario for key distribution, i.d. every key has a unique hash value. In a worse case the bucket count can be less than the number of elements stored in the container.

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

Return Value

Type: size_t

Current bucket count.

See Also

$(D_PSYMBOL rehash).

Meta