Working of bool ==operator( ) in this case?

How does this get invoked during the call of hash function?
Is it only when two names are equal or does it check every name with every other name ? What’s the mechanism for this comparison?