我正在阅读C++ Primer,这段代码让我有点困惑。也许我已经阅读过,但忘记了它的内容。拷贝构造函数的区别?
这段代码有2个拷贝构造函数,但我不知道有什么区别他们
class Quote {
public:
Quote() = default;
Quote(const Quote&) = default; // <<== this one
Quote(Quote&&) = default; // <<== and this one
Quote& operator=(const Quote&) = default;
Quote& operator=(Quote&&) = default;
virtual ~Quote() = default;
}
就是一般的差之间?
和双“&”是什么意思?
请参阅[本](http://stackoverflow.com/a/4549167/2899559)回答。 – 2015-04-01 07:14:53
复制构造函数和移动构造函数。 – Jarod42 2015-04-01 07:14:58
thnx!我只记得.. RValue参考是用于移动即将销毁的物品 – CantThinkOfAnything 2015-04-01 07:24:37