C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Q: invariant for unordered_set and unordered_map "hash" and "comp" argument

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Fri, 27 Nov 2026 10:16:46 +0100
And even that salient part would have to be normalized (for a planned bitwise compare) for some data formats, which allow non-unique representations of the same value. And even then it may be application-dependent. E.g. is a positive 0 equal to a negative 0? So even float or double as types perhaps used for the representation of the salient part, the bitwise comparison may be unapplicable. -----Ursprüngliche Nachricht----- Von:Jonathan Wakely via Std-Proposals <std-proposals_at_[hidden]> (An alternative design would be to have a projection function which just gives you the salient parts of the object, so you would call proj(obj) which would return const A&, and you could hash that and compare that for equality. But we don't have that design either.)

Received on 2026-11-27 09:18:40