1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
// unordered_multiset::rehash
#include <iostream>
#include <string>
#include <unordered_set>
int main ()
{
std::unordered_multiset<std::string> myums;
myums.rehash(12);
myums.insert("red");
myums.insert("red");
myums.insert("blue");
myums.insert("green");
myums.insert("yellow");
std::cout << "current bucket_count: " << myums.bucket_count() << std::endl;
return 0;
}
| |