BloombergLP::bslstl::HashTable::bucketIndexForKey

Return the bucket index for the specified transparent key.

Synopsis

Declared in <bslstl_hashtable.h>

template<class LOOKUP_KEY>
SizeType
bucketIndexForKey(LOOKUP_KEY const& key) const
requires BloombergLP::bslmf::IsTransparentPredicate<HASHER,    LOOKUP_KEY>::value
   && BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,LOOKUP_KEY>::value;

Description

Return the index of the bucket that would contain all the elements equivalent to the specified key.

Return Value

index of the bucket that would contain elements equivalent to key

Parameters

NameDescription
keytransparent key whose bucket index is returned