归来的区别是什么?*this
还是 C++ 中 operator= 的实现中给定的参数?如果是,为什么?
class Object {
public:
Object operator=(Object Obj) {
return *this;
}
}
与
class Object {
public:
Object operator=(Object Obj) {
return Obj;
}
}
X& operator=( X const& ) { return *this; }
的语义相匹配。=
关于 int
. 你给出的其他建议没有。 当有疑问时,请匹配以下的语义 int
.