我张贴了类似的quetion使用在C++ STL地图指针作为键就.当用作Keys时,指针如何在unordered_maps中进行哈希处理.更具体地说,如果我定义:
std::unordered_map< CustomClass*, int > foo;
默认的C++ std :: hash实现是否可以处理这些指针?使用安全吗?这是好习惯吗?
c++ hash stl unordered-map
c++ ×1
hash ×1
stl ×1
unordered-map ×1