Looking around on cppreference, I found that std::unordered_map
gets efficient lookup functions from "equivalent keys".
I take that to mean that the equivalent key must have the same hash value. How can I provide that for a string literal I get the same hash value as for std::hash<std::string>
without temporarily constructing an std::string
and thereby making the whole point about the equivalent keys for naught?