static_cast(*this) += 5 A temporary object will be created, and "this" object will not be changed. static_cast(*this) += 5 No temporary object created, and the "RWTime" part of "this" object will be changed (Provided that operator+= is not virtual).
c*x
4 楼
I disagree. static_cast(*this) += 5 the object itself pointed by *this add 5; static_cast(*this) += 5 the object allias pointed by *this add 5;
【在 W*********g 的大作中提到】 : static_cast(*this) += 5 : A temporary object will be created, and "this" object will not be changed. : static_cast(*this) += 5 : No temporary object created, and the "RWTime" part of "this" object will : be changed (Provided that operator+= is not virtual).