Namespaces
Variants
Views
Actions

std::unordered_multiset::bucket

From cppreference.com
< cpp‎ | container‎ | unordered multiset
Revision as of 20:38, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
size_type bucket( const Key& key ) const;
(since C++11)

Returns the index of the bucket for key key. Elements (if any) with keys equivalent to key 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.

Contents

[edit] Parameters

key - the value of the key to examine

[edit] Return value

Bucket index for the key key.

[edit] Complexity

Constant.

[edit] See also

returns the number of elements in specific bucket
(public member function) [edit]