Reputation: 16630
Given
std::unordered_map<std::string, sf::Texture> container;
will
container["myKey"] = myTexture;
transform "myKey" into a hash behind the scenes?
If so, are duplicate hashes possible?
Upvotes: 2
Views: 146
Reputation: 500327
Yes, it does.
No, hashes don't have to be unique: if two keys hash to the same value, the keys themselves have to be compared to establish whether or not they are equal.
Upvotes: 2