The STL has hash_map, but the C++ Standard Library does not.
STL有hash_map,但是c++标准库没有。
Due to a common misconception, you may think of the C++ Standard Library as "the STL", or of parts of your toolchains implementation of the C++ Standard Library as "an STL implementation". It is not.
It is also a great shame that both MSVC++ and GCC (which implement hash_map as a compiler-specific extension), place it in the std namespace, which is highly misleading. *sigh*
C++11 has introduced std::unordered_map, which is not dissimilar.
c++ 11引入了std:::unordered_map,这并没有什么不同。
#2
13
Quoting Wikipedia (emphasis added):
引用维基百科(重点):
From the STL page:
STL的页面:
The Standard Template Library (STL) is a software library partially included in the C++ Standard Library.
标准模板库(STL)是一个部分包含在c++标准库中的软件库。
...and then from the hash_map page
…然后从hash_map页面开始
In the C++ programming language, hash_mapis 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.
But it is supported by several very popular implementations.
但是有几个非常流行的实现支持它。
#3
7
The problem is that there is no agreed upon meaning for the term STL. Is hash_map part of Standard C++? No, it isn't. unordered_map will be part of the new C++ standard, however, and is a map implemented using hashing.
Yes, hash_map is part of the STL. However, it is not part of C++03's standard library.
是的,hash_map是STL的一部分。但是,它不是c++ 03的标准库的一部分。
#5
2
hash_map is a part of STL, but not a part of Standard C++(C++11). And there is a similar implementation of hash_map named "std::unordered_map" in standard C++: http://www.cplusplus.com/reference/unordered_map/unordered_map/
Currently, GNU C++ and MSVC++ have implemented hash_map for compiler extension, as well as Boost. Meanwhile, SGI has its own implementation for hash_map. You can refer to http://www.sgi.com/tech/stl/hash_map.html for details.
本文详细介绍了一种利用 ESP8266 01S 模块构建 Web 服务器的成功实践方案。通过具体的代码示例和详细的步骤说明,帮助读者快速掌握该模块的使用方法。在疫情期间,作者重新审视并研究了这一未被充分利用的模块,最终成功实现了 Web 服务器的功能。本文不仅提供了完整的代码实现,还涵盖了调试过程中遇到的常见问题及其解决方法,为初学者提供了宝贵的参考。 ...
[详细]