unordered_map_max_bucket_count
unordered_map_max_bucket_count (std::unordered_map::max_bucket_count — 최대 버킷 개수)
std::unordered_map이 가질 수 있는 최대 버킷 개수를 반환하는 멤버 함수예요.
출처: cppreference
본문
시그니처는 다음과 같아요.
size_type max_bucket_count() const noexcept;
컨테이너가 가질 수 있는 최대 버킷 개수를 반환해요.
반환값
최대 버킷 개수.
복잡도
상수(constant)예요.
예제
#include <iostream>
#include <unordered_map>
int main()
{
std::unordered_map<int, char> m;
std::cout << m.max_bucket_count() << '\n'; // 플랫폼 의존
}
함께 보기
bucket_count: 현재 버킷 개수를 반환해요