Skip to content

Can I hash a container? #249

Answered by arximboldi
ianthehenry asked this question in Q&A
Discussion options

You must be logged in to vote

You can define override std::hash and define it by iterating over the container, hashing every element and combining the hashes (using something like boost:::hash_combine or your own hash combination formula).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ianthehenry
Comment options

@arximboldi
Comment options

Answer selected by ianthehenry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants