//标准命名空间进行扩展
namespace std
{
//模板的特化
template <>
struct hash<Point>
{
size_t operator()(const Point &rhs) const
{
return (rhs.getX() << 1 ) ^ (rhs.getY() << 2);
}
};
bool operator==(const Point &lhs, const Point &rhs)//重载针对Point的operator==()
{
return (lhs.getX() == rhs.getX()) && (lhs.getY() == rhs.getY());
}
unordered_set<Point> number = { Point(1, 2),Point(-1, -2) };//使用默认参数