} Pretty self explanatory. I want to detect when the deleted_key is
} going to be inserted and change the deleted_key when this happens.
} Right now I'm caching the deleted_key, but it would be easier to ask
} the sparsehash itself.
Actually, would you like to try your hand at a patch? I think the
right thing to do is to add functions called
key_type deleted_key() const
key_type empty_key() const
I guess we'll have to figure out reasonable answers for these to give
when the deleted key and empty key haven't been set yet.
You should also implement
key_type empty_key() const
for densehashtable.h.
Finally, you'll have to expose these methods up through
{dense,sparse}_hash_{map,set}, update the documentation for those four
files (in the doc/ directory), and add unittest cases that test the
behavior for all 6 variants (sparse/dense table/map/set) -- though
it's probably only one or two added tests, since we get a lot of test
coverage via the templatized test functions.
Quite a bit of machinery, but STL is like that. :-(
craig