r/cpp • • Sep 07 '26

flat_map internals

https://quantdev.blog/posts/flat-map-internals/index.html
12 Upvotes

12 comments sorted by

View all comments

Show parent comment

3

u/Life_Sink9598 Sep 08 '26

Aha, the Deleted variant is required because Empty also indicates that a lookup can cease probing. So H(A) == H(B) [Full(A), Full(B), Empty] after delete A must become [Deleted, Full(B), Empty], otherwise lookup(B) would probe at index 0, see empty, and return false.