[#BloombergLP-bslstl-HashTable-bucketIndexForKey-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable.adoc[HashTable]::bucketIndexForKey
:relfileprefix: ../../../
:mrdocs:

Return the bucket index for the specified transparent `key`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:BloombergLP/bslstl/HashTable/SizeType.adoc[SizeType]
bucketIndexForKey(LOOKUP&lowbar;KEY const& key) const
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;HASHER,    LOOKUP&lowbar;KEY&gt;&colon;&colon;value
   &amp;&amp; BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

== Description

Return the index of the bucket that would contain all the elements equivalent to the specified `key`&period;

== Return Value

index of the bucket that would contain elements equivalent to `key`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| transparent key whose bucket index is returned
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
