hash_set, hash_map在linux下编译出现not declared的解决方法

Formal deprecation of <ext/hash_set> and <ext/hash_map>, which are now <backward/hash_set> and <backward/hash_map>. This code: 
#include <ext/hash_set>
__gnu_cxx::hash_set<int> s;

Can be transformed (in order of preference) to: 
#include <tr1/unordered_set>
std::tr1::unordered_set<int> s;

or 
#include <backward/hash_set>
__gnu_cxx::hash_set<int> s;

Similar transformations apply to __gnu_cxx::hash_map, __gnu_cxx::hash_multimap, __gnu_cxx::hash_set, __gnu_cxx::hash_multiset. 

猜你喜欢

转载自blog.csdn.net/yming0221/article/details/22196901