ASSIGN_OP 中的模式匹配任何标准的赋值运算符:=、+=、-=、*=,等等,但是注意不要匹配其他包含 = 的运算符,比如 ==和 =~。
The pattern in ASSIGN_OP matches any of the standard assignment operators: =, +=, -=, *=, etc. but carefully avoids matching other operators that contain =, such as == and =~.
目标在于避免意外地使用单等号赋值运算符而非双等号比较运算符
The goal here is to avoid accidentally using the single-equals assignment operator instead of the double-equals comparison operator
不过,可为类型定义隐式转换运算符,这样就可以对这些类型使用赋值运算符。
However, you can define implicit conversion operators for a type, which enable you to use the assignment operator with those types.
重载二元运算符时,也会隐式重载相应的赋值运算符(如果有)。
When a binary operator is overloaded, the corresponding assignment operator, if any, is also implicitly overloaded.
基类中的赋值运算符不可访问,因此无法为派生类生成赋值运算符。
An assignment operator was not accessible in a base class and was therefore not generated for a derived class.
除赋值运算符外,重载运算符可由派生类继承下去。
Outside dividing assignment operation accord with, heavy carry calculates Fu Ke by derive kind successive go down.
除赋值运算符外,重载运算符可由派生类继承下去。
Outside dividing assignment operation accord with, heavy carry calculates Fu Ke by derive kind successive go down.
应用推荐