Is hash_map part of the STL?

后端 未结 6 1951
一向
一向 2020-11-27 02:54

Quick question...Is hash_map part of the STL?

6条回答
  •  眼角桃花
    2020-11-27 03:45

    Quoting Wikipedia (emphasis added):

    From the STL page:

    The Standard Template Library (STL) is a software library partially included in the C++ Standard Library.

    ...and then from the hash_map page

    In the C++ programming language, hash_map is the name of a hashed associative container in the Standard Template Library. It is provided by several implementors, such as the GNU C++ compiler and Microsoft's Visual C++. It is not part of the C++ Standard Library, but the C++ Technical Report 1 contains the very similar container unordered_map, which will be included in the upcoming C++0x standard.

    So in short,

    • YES it's part of the STL.
    • But it IS NOT part of the standard library.
    • But it is supported by several very popular implementations.

提交回复
热议问题