Код: Выделить всё
struct Data {
int x;
int y;
bool operator(const Data& other) const {
return !(*this < other) && !(*this == other);
}
};
Код: Выделить всё
struct Data {
int x;
int y;
auto operator(const Data& other) const = default;
};
https://godbolt.org/z/17EbTabG5
Подробнее здесь: https://stackoverflow.com/questions/793 ... erator-etc
Мобильная версия