↑: [[c++]]
- 内部で値を変えない場合は、`const`をつける
- `+=`など上書きする場合はつけない。それと参照を返すので戻り値に`&`をつける
- [[前置インクリメント]]は戻り値が参照方で()はintなし
- [[後置インクリメント]]は戻り値が実体で()はintあり
```cpp
class Calc {
Calc operator+(const Calc& other) const;
Calc operator-(const Calc& other) const;
Calc operator*(const Calc& other) const;
Calc operator/(const Calc& other) const;
Calc &operator+=(const Calc& other);
Calc &operator-=(const Calc& other);
Calc &operator*=(const Calc& other);
Calc &operator/=(const Calc& other);
Calc &operator++();
Calc operator++(int);
Calc &operator--();
Calc operator--(int);
bool operator>(const Calc& other) const;
bool operator<(const Calc& other) const;
bool operator>=(const Calc& other) const;
bool operator<=(const Calc& other) const;
bool operator==(const Calc& other) const;
bool operator!=(const Calc& other) const;
};
```