Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

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

Returns the number of buckets in the container.

NotebookLM
size_type bucket_count() const;
(since C++11)

Returns the number of buckets in the container.

Parameters

(none)

Return value

The number of buckets in the container.

Complexity

Constant.

See also

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

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.