File: unordered_map.cpp

package info (click to toggle)
yrmcds 1.0.4-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 924 kB
  • ctags: 1,346
  • sloc: cpp: 9,634; sh: 133; makefile: 97
file content (13 lines) | stat: -rw-r--r-- 446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <unordered_map>
#include <string>
#include <iostream>

int main(int argc, char** argv) {
    std::unordered_map<std::string, std::string> m;
    std::cout << "Default max load factor: " << m.max_load_factor() << std::endl;
    std::cout << "Default bucket count: " << m.bucket_count() << std::endl;
    m.max_load_factor(1.0);
    m.reserve(65536);
    std::cout << "Bucket count now: " << m.bucket_count() << std::endl;
    return 0;
}