#include <iostream>
#include <set>

struct Point
{
	Point(double x, double y)
	: x(x)
	, y(y)
	{
		
	}
	
	friend bool operator < (const Point& lhs, const Point& rhs);
	friend bool operator == (const Point& lhs, const Point& rhs);
	
	double x;
	double y;
};

bool operator < (const Point& lhs, const Point& rhs)
{
	return lhs.x < rhs.x;
}

bool operator == (const Point& lhs, const Point& rhs)
{
	return lhs.x == rhs.x && lhs.y == rhs.y;
}

int main() 
{
	std::set<Point> points = { Point(42.0, 50.0), Point(1.0, 2.0), Point(42.0, 50.0) };
	
	for (const auto& p : points)
	{
		std::cout << p.x << ", " << p.y << std::endl;	
	}
	
	return 0;
}