对于所有复合赋值运算符, 隐式重载二元运算符会重载等效的复合赋值.
互联网摘选
重载二元运算符时, 也会隐式重载相应的赋值运算符(如果有).
互联网摘选
To avoid this warning, specify a user-defined assignment operator for the class.
若要避免出现此警告, 请为该类指定用户定义的赋值运算符.
互联网摘选
与构造函数一样, 赋值操作符可以通过指定不同类型的右 操作数 而重载.
互联网摘选
An assignment operator stores the value of the right expression into the left expression.
赋值操作符把右边表达式的值赋值给左边的表达式.
互联网摘选
The synthesized assignment operator member wise assigns the right-hand operand to the left.
合成赋值操作符将右 操作数 逐个成员地赋值给左操作数.
互联网摘选
The assignment operator assigns, member by member, from the old object to the new.
赋值操作符将成员依次从旧对象赋值给新对象.
互联网摘选
Making the class assignment operator virtual is likely to be confusing and unlikely to be useful.
将类的赋值操作符设为虚函数很可能会令人混淆,而且不会有什么用处.
互联网摘选
目标在于避免意外地使用单等号赋值运算符而非双等号比较运算符
互联网摘选
