阅读背景:

hash_map中string为key的解决方法

来源:互联网 

当hash_map中使用string为key时,需用户扩展命名空间,否则报错如下:

/usr/lib/gcc/x86_64-redhat-linux/3.4.5/../../../../include/c++/3.4.5/ext/hashtable.h:518: error: no match for call to `(const __gnu_cxx::hash<std::string>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'/us




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: