unique_ptr::swap
交换两个 unique_ptr 对象的指针。
void swap(unique_ptr& _Right);
参数
- _Right
unique_ptr 用于交换指针。
备注
成员函数将交换 stored_ptr 以及 right.stored_ptr 和 stored_deleter 的 right.stored_deleter。
要求
页眉: <内存>
命名空间: std
交换两个 unique_ptr 对象的指针。
void swap(unique_ptr& _Right);
成员函数将交换 stored_ptr 以及 right.stored_ptr 和 stored_deleter 的 right.stored_deleter。
页眉: <内存>
命名空间: std