All Unordered-Container Facilities
All Unordered-Container Facilities
A compact scan page for hash-based containers, hashing support, bucket interfaces, and practical lookup rules.
All Unordered-Container Facilities
A compact scan page for hash-based containers, hashing support, bucket interfaces, and practical lookup rules.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
std::unordered_mapstd::unordered_multimapstd::unordered_setstd::unordered_multisetstd::hashfindcontainscountequal_rangeinsert, emplace, try_emplace, insert_or_assignerase, extract, mergebucket_countbucketload_factormax_load_factorrehashreserve#include <map>
#include <string>
int main() {
std::map<std::string, int> counts{std::pair{"Ada", 1}, std::pair{"Bjarne", 2}};
auto [it, inserted] = counts.insert({"Grace", 3});
return inserted ? it->second : 1;
}