【发布时间】:2011-03-25 15:21:13
【问题描述】:
根据this,可以像这样在TR1 unordered_map中定义一个相等函数:
#include <tr1/unordered_map>
using namespace std;
using namespace std::tr1;
struct foo{
...
bool operator==(const foo& b) const{
return ..;
}
};
unordered_map<foo,int> map;
是否可以用同样的方式定义散列函数?
【问题讨论】:
标签: c++ hash tr1 unordered-map