Does the STL contain a hashtable?

Viewed 55813
3 Answers

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.

Related