Template:cpp/container/bucket

Returns the index of the bucket for key. Elements (if any) with keys equivalent to are always found in this bucket. The returned value is valid only for instances of the container for which bucket_count returns the same value.

The behavior is undefined if bucket_count is zero.

Return value
Bucket index for the key.

Complexity
Constant.