结构体和类的operator<

typedef struct Point{
    double x,y;
    bool operator<(const Point &other) const
    {
        return x<other.x;
    }
};
原文地址:https://www.cnblogs.com/jianfengyun/p/3722385.html