Skip to content

Fix implementation of std::pair hash #31

@dan1994

Description

@dan1994

Currently, the implementation is hash(pair.first) ^ hash(pair.second) which results in 0 for any pair that satisfies pair.first == pair.second (as @roynecro pointed out in #30).

@roynecro suggests to use hash(concat(hash(pair.first), hash(pair.second))) which will have a performance toll, but will be the most correct.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions