/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/cpp/cpp-506-26-002/main.cpp
15 строк
337 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
template<typename Derived> class Comparable { public: bool operator!=(const Derived& other) const { return !static_cast<const Derived*>(this)->operator==(other); } }; class Point : public Comparable<Point> { int x, y; public: bool operator==(const Point& p) const { return x == p.x && y == p.y; } };