由买买提看人间百态

topics

全部话题 - 话题: rwtime
(共0页)
W*********g
发帖数: 409
1
来自主题: Programming版 - 问两个问题,C++
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
来自主题: Programming版 - 问两个问题,C++
一、受保护的析构函数有什么作用?
二,下面的表达式有什么区别?
static_cast(*this) += 5
static_cast(*this) += 5
谢谢大家
c********x
发帖数: 84
3
来自主题: Programming版 - 问两个问题,C++

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;
(共0页)