entt
entt copied to clipboard
Sparse set cross range-erase can break when using built-in iterators
I am encountering a weird issue where I have a set with (0x8, 0x100009) for example, and I call entt::sparse_set::erase with a set which contains (0x100009) and the result is the set (0x100009), where the set (0x8) is expected.
Repro https://godbolt.org/z/P8ezsKrfT
I think you're right. I tried to optimize the pop function a little too much. 😅 The nice thing is that branch v3.10.1 and wip also have a divergence, so I'll have to fix it twice! 😭 Good catch btw, I'll confirm it asap but I'm pretty sure you found a corner cases that isn't covered by a test (and also provided the latter, which is good ❤️).
I've created a new tag, v3.10.2 - it would be great if you could test it and confirm that the issue is gone. There are a bunch of tests to verify it and avoid regressions, so I'm pretty confident. Just a double check. 🙂
Also solved on wip in the meantime. 👍
~~I strongly suspect it's not fixed yet, shame on me. 🤔~~
Also the storage suffers from the same issue. I'm creating a new issue to track it and spawning a new patch release in a row.
Fixed in release (v3.10.2).