I published a similar quetion regarding the use of pointers as keys on maps in C ++ STL. How pointers are hashed in unordered_maps when used as keys. More specifically, if I define:
std::unordered_map< CustomClass*, int > foo;
Will the default C ++ implementation of std :: hash execute these pointers? Is it safe to use? Is this a good practice?
source share