std::experimental::swap(std::experimental::observer_ptr)
来自 cppreference.cn
< cpp | experimental | observer ptr
template< class W > void swap( observer_ptr<W>& lhs, observer_ptr<W>& rhs ) noexcept; |
(library fundamentals TS v2) | |
为 std::experimental::observer_ptr 特化 swap 算法。交换 lhs 和 rhs 的指针。调用 lhs.swap(rhs)。
目录 |
[编辑] 参数
lhs, rhs | - | 要交换内容的 observer_ptr |
[编辑] 返回值
(无)
[编辑] 复杂度
常数。
[编辑] 参见
交换两个对象的值 (函数模板) | |
交换被观察的对象 (公共成员函数) |