How do I use unordered_set? [duplicate]
This question already has an answer here: Using C++11 unordered_set in Visual C++ and clang 1 answer I am trying to define an unordered_set like this: unordered_set<Point> m_Points; When I compile it, I get the following error: The C++ Standard doesn't provide a hash for this type. Class Point : class Point{ private: int x, y; public: Point(int a_x, int a_y) : x(a_x), y(a_y) {} ~Point(){} int getX()const { return x; } int getY()const { return y; } bool operator == (const Point& rhs) const{ return x == rhs.x && y == rhs.y; } bool operator != (const Point& rhs) const{ return !(*this == rhs); } }