std::unordered_multimap::bucket

std::unordered_multimap::bucket

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.

Parameters

key - the value of the key to examine

Return value

Bucket index for the key key.

Complexity

Constant.

See also

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

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/unordered_multimap/bucket

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部