如果我们在使用键时unordered_map定义hash和函子。preduser-defined
地图的模板语法如下:
template < class Key, // map::key_type
class T, // map::mapped_type
class Compare = less<Key>, // map::key_compare
class Alloc = allocator<pair<const Key,T> > // map::allocator_type
> class map;
在 map 的情况下,没有hash和predfunctors 选项。在map. 如果发生碰撞,那么为什么我们没有像 in 中的hashandpred函子unordered_map呢?我在这里错过了什么吗?