hash_map vs unordered_map

May 19, 2013 at 5:39pm
hash_map is Visual C++ specific and unordered_map is from the standard.
Both work the same storing everything in "buckets" based on hash values generated from their keys.

So why is there a hash_map in Visual C++, what does this provide that unordered_map does not?
May 19, 2013 at 5:42pm
A small google search tells me that they implemented hash_map before unordered_map was introduced in C++11 and I guess it is just there still.

If anyone knows more please tell me!
May 19, 2013 at 6:22pm
What more do you want? You already answered your own question. Research first then ask.
May 19, 2013 at 6:24pm
If there is anymore to know, maybe a different reason. But ok, I shall do research first and then ask.
May 19, 2013 at 6:46pm
The hash_map documentation for Visual Studio 2012 says
This API is obsolete. The alternative is unordered_map Class.
May 19, 2013 at 6:53pm
Alright thanks!


So I should never use hash_map.
Topic archived. No new replies allowed.