C++ Hash table

Hash tables were not part of the Standard C++ Library before C++0x, but there are a number of different implementations providing them, under the names of hash_set, hash_multiset, hash_map, and hash_multimap.

Since these names have been already taken, the C++0x hash containers have a bit less intuitive names: unordered_set, unordered_multiset, unordered_map, and unordered_multimap.

If your compiler does not support yet this C++0x feature, you can use the boost implementation, that is already available, almost surely, for it too.

Effective STL is one of the Effective C++ book series by Scott Meyers. Its Item 26 is about the pre-C++0x non-standard hash containers

No comments:

Post a Comment