CppDS.com

C++ 98 11 14 17 20 手册

std::unordered_map<Key,T,Hash,KeyEqual,Allocator>::bucket_count

来自cppreference.com

 
 
 
 
size_type bucket_count() const;
(C++11 起)

返回容器中的桶数。

参数

(无)

返回值

容器中的桶数。

复杂度

常数。

参阅

返回在特定的桶中的元素数量
(公开成员函数)
返回桶的最大数量
(公开成员函数)
关闭