C++中的**this

来源:互联网 发布:盛势网络剧08bilibili 编辑:程序博客网 时间:2024/05/28 09:33

stl中**this

看到stl代码中,有对->*的重载,而且对**this&**this不是太理解。反汇编看到如下代码就理解了

        return ((reference)**(_Mybase *)this);004345A3  mov         ecx,dword ptr [this] //*this004345A6  call        std::_Vector_const_iterator<int,std::allocator<int> >::operator* (4310E5h)

如果去掉一个*

        return ((reference)*(_Mybase *)this);00434593  mov         eax,dword ptr [this] 
0 0
原创粉丝点击