I have a quick question about hash tables (unordered associative containers) in the STL.
Why are hash table specific APIs provided? like the load_factor() function, bucket() and bucket_count()? I know these are used to know about what bucket each entry is listed in, but why would you even need to know the underlying implementation details of hash tables and what could these details be used for? Can't you just use the hash table abstraction?
Well the STL does not really allow "handling" of collisions, but you could try to restructure insertions to try to avoid collisions. That would be beyond my knowledge though. I just know that having the hash map rehashed often is not necessarily a good thing.