std::move is used to indicate that an object t may be “moved from”, i.e. allowing the efficient transfer of resources from t to another object.
In particular, std::move produces an xvalue expression that identifies its argument t. It is exactly equivalent to a static_cast to an rvalue reference type.
在《Data Structures And Algorithm Analysis in Cpp》中学习堆的相关操作,碰到 move 函数的使用,做点笔记。以下是书中小顶堆的插入实现: