Loading docs/lang/op-overload.md +6 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ C++ 自带的运算符,最初只定义了一些基本类型的运算规则。 因此,对于类型 T,典型的重载自增运算符的定义如下: | 重载定义(以 `++` 为例) | 成员函数 | 非成员函数 | | ------------------------ | --------------------- | ---------------------- | | --------------- | ------------------------- | ---------------------------- | | 前置 | `T& T::operator++();` | `T& operator++(T& a);` | | 后置 | `T T::operator++(int);` | `T operator++(T& a, int);` | Loading Loading
docs/lang/op-overload.md +6 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ C++ 自带的运算符,最初只定义了一些基本类型的运算规则。 因此,对于类型 T,典型的重载自增运算符的定义如下: | 重载定义(以 `++` 为例) | 成员函数 | 非成员函数 | | ------------------------ | --------------------- | ---------------------- | | --------------- | ------------------------- | ---------------------------- | | 前置 | `T& T::operator++();` | `T& operator++(T& a);` | | 后置 | `T T::operator++(int);` | `T operator++(T& a, int);` | Loading