std::swap(std::forward_list)
STD::交换%28 std::正向[医]名单%29
template< class T, class Alloc > void swap( forward_list | | (since C++11) (until C++17) |
---|---|---|
template< class T, class Alloc > void swap( forward_list<T,Alloc>& lhs, forward_list<T,Alloc>& rhs ) noexcept(/* see below */ | | (since C++17) |
专攻std::swap
算法std::forward_list
.交换lhs
和rhs
.电话lhs.swap(rhs)
...
参数
lhs, rhs | - | containers whose contents to swap |
---|
返回值
%280%29
复杂性
常量。
例外
noexcept specification: noexcept(noexcept(lhs.swap(rhs))) | (since C++17) |
---|
另见
swap | swaps the contents (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。