相关疑难解决方法(0)

C++双地址运算符?(&&)

我正在阅读STL源代码,我不知道&&运算符应该做什么.以下是一个代码示例stl_vector.h:

vector&
operator=(vector&& __x) // <-- Note double ampersands here
{
    // NB: DR 675.
    this->clear();
    this->swap(__x); 
    return *this;
}
Run Code Online (Sandbox Code Playgroud)

"地址"是否有意义?为什么它有两个地址运算符而不是一个?

c++ stl memory-address operator-keyword

116
推荐指数
5
解决办法
9万
查看次数

标签 统计

c++ ×1

memory-address ×1

operator-keyword ×1

stl ×1