对不起,我不能带来更好的头衔.
最后一个&符号&在以下代码段中的含义如下:
A & A::operator=(A rhs) &
{
swap(*this, rhs);
return *this;
}
Run Code Online (Sandbox Code Playgroud)
根据答案我想知道:
operator=或可以应用于任何功能如果你需要更多的上下文,我在这里找到了这个语法:https://stackoverflow.com/a/12653520/951426
有一个小的解释,但我不明白.
编辑(格式化和简短回答我的问题):
operator=