|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-12-12 13:22:00
Julien Blanc wrote:
> Le mercredi 11 décembre 2024 à 19:31 +0200, Peter Dimov via Boost a écrit :
> > You've already stated that you don't think copy construction should be
> > required. But copy construction is required by the current
> > implementation of hash_append_unordered_range.
>
> The way you phrase it make it sounds like it could be implemented without
> requiring copy construction. Is that poor understanding from my side?
I feel like I already answered this question.
The alternative mechanism given in N3980, constructing a temporary std::set
from the unordered set elements, then hashing that, is wildly impractical
for obvious reasons, performance and otherwise.
Using default-constructed instances of the hash algorithm, instead of copies,
makes the hashing seed-independent, which means that a way to engineer
collisions will work regardless of the seed used.
I say "by the current implementation" because I obviously can't say anything
about hypothetical future and unknown to me implementations.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk