Effective C++ 条款10:令operator=返回一个reference to *this
EffectiveC++条款10:令operator=返回一个referenceto*this核心思想:赋值操作符(operator=)应始终返回当前对象的引用(*this),以实现连锁赋值并保持与内置类型一致的语义。⚠️1.问题场景:违反连锁赋值语义classWidget{public:voidoperator=(constWidget&rhs){//错误:返回voidvalue=rhs.val