What should I pass to unordered_map's bucket count argument if I just want to specify a hash function?

前端 未结 2 2045
花落未央
花落未央 2021-01-07 17:42

C++11\'s unordered_map\'s default constructor looks like this:

explicit unordered_map( size_type bucket_count = /*implementation-defined*/,
             


        
2条回答
  •  醉话见心
    2021-01-07 18:24

    One of the template parameters for unordered_map is the hash function. If you specify your hash function object there you can leave the constructor parameters at their default settings.

提交回复
热议问题