W*********g 发帖数: 409 | 1 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). |
|
v*********o 发帖数: 5 | 2 一、受保护的析构函数有什么作用?
二,下面的表达式有什么区别?
static_cast(*this) += 5
static_cast(*this) += 5
谢谢大家 |
|
c********x 发帖数: 84 | 3
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; |
|