……世界上最受推崇、设计最精良的 C++ 库项目之一。 — Herb Sutter 和 Andrei Alexandrescu, C++ Coding Standards
……世界上最受推崇、设计最精良的 C++ 库项目之一。
可赋值
可赋值类型必须定义拷贝构造函数、赋值运算符 operator= 以及 swap() 函数。
operator=
swap()
CopyConstructible
x
y
赋值
x = y
X &
需要 operator=
Swap
swap(x, y)
void
需要 swap() 函数