class Product{
private:
int price;
string name;
public:
friend bool operator >(Product a, Product b){
return a.price > b.price;
}
};friend bool operator ==(Product a, Product b){
return a.price == b.price;
} namespace std::rel_ops в котором есть определения операторов !=, >, <=, >=. Оно?