std::swap(std::unique_ptr)
STD::SWAP%28std::UNIQUE[医]PTR%29
template< class T, class Deleter > void swap( unique_ptr | | (since C++11) |
---|
专攻std::swap
算法std::unique_ptr
.交换指针lhs
和rhs
.电话lhs.swap(rhs)
...
This function does not participate in overload resolution unless std::is_swappable | (since C++17) |
---|
参数
lhs, rhs | - | smart pointers whose contents to swap |
---|
返回值
%280%29
例外
noexcept
规格:
noexcept
复杂性
常量。
另见
swap | swaps the values of two objects (function template) |
---|---|
swap | swaps the contents (public member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。