错误:C2888: “std::hash”: 不能在命名空间“tr1”内定义符号
我在编译meshlab代码时出现这个错误:
meshlabsrc_allinc_v131\meshlab\src\meshlabplugins\filter_csg\intercept.h:27: 错误:C2888: “std::hash<vcg::Point3i>”: 不能在命名空间“tr1”内定义符号
错误代码如下,实在不知道怎么修改如下代码,哪位帮忙下?
namespace std {
namespace tr1 {
template <>
struct hash<vcg::Point3i>
: public std::unary_function<vcg::Point3i, std::size_t>
{
std::size_t operator()(const vcg::Point3i &x) const
{
std::tr1::hash<int> h;
return ((x[0]) * 131 + h(x[1])) * 131 + h(x[2]);
}
};
}
}