I use FoldingSet to save some data structures. And I found somehow it always abandon a new node. I tracked the bug into the ComputeHash() function of FoldingSet. It computes the SAME hash value for these two 32-bit unsigned integer sequences:
size: 17
4144534024, 32767, 4146895704, 32767, 4027803688, 32767, 4026983736, 32767, 4147202696, 32767, 4026587256, 32767, 0, 4026589472, 32767, 0, 0,
size: 16
4030909168, 32767, 4028631392, 32767, 4029542384, 32767, 0, 4028487592, 32767, 4026587256, 32767, 0, 4026589472, 32767, 0, 0,
The hash value is 2111586599
The test code is attached.
What should we do with it?
test-hash.cpp (1.12 KB)