cpp 中的 swap

如果你了解 cpp中的移动语义, 那么 std::swap 就非常好理解了, 大致过程如下

template<typename T>
void swap(T& left, T& right)
{
	T a = std::move(right);
	right = std::move(left);
	left = std::move(a);
}