See note 1 on https://eel.is/c++draft/hash.requirements Equal values MUST produce the same hash value - if two values of a given type that compare equal could produce different hash values then that would render such a type effectively unusable as a key in hash-based associative containers.
On 12 Oct 2025, at 11:18, Peter Dimov via Boost <boost@lists.boost.org> wrote:
Matt Borland wrote:
In the general case should an entire equivalence class hash to the same value?
If they compare equal, yes. That's a hash function requirement.
_______________________________________________ Boost mailing list -- boost@lists.boost.org To unsubscribe send an email to boost-leave@lists.boost.org https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/boost@lists.boost.org/message/I56KQHPU...