Does the STL contain a hashtable?

c++, hashtable, stl

Solution

Current standard implementation doesn't, STL::TR1 does, see Unordered Map.

Most modern compilers have a TR1 implementation, if that fails, you may always use the Boost TR1 implementation.

- MSVC has it for VS2008 via service pack 1

- GCC has it shipped with 4.x, but you can make it work with 3.4.x too AFAIR

Usage is almost the same as with a std::map.

Problem

Possible Duplicates: Hashtable in C++? can anybody offer a simple hash_map example in C++? Does the STL contain an implementation of a hashtable? If so, can you provide a brief example of how to use it?

Original source

Related problems