unique_ptr::swap

交换在两 unique_ptr 对象之间的指针。

void swap(unique_ptr& _Right);

参数

  • _Right
    用于的 unique_ptr 交换指针。

备注

成员函数交换 stored_ptr 和 right.stored_ptr 和 stored_deleter 和 right.stored_deleter。

要求

**标题:**memory

命名空间: std

请参见

参考

unique_ptr Class

<memory>

线程安全性对标准C++库中

其他资源

unique_ptr 成员

memory 成员