std::swap(std::basic_string)
STD::交换%28 std::basic[医]字符串%29
template< class CharT, class Traits, class Alloc > void swap( std::basic_string | | (until C++17) |
---|---|---|
template< class CharT, class Traits, class Alloc > void swap( std::basic_string<CharT, Traits, Alloc> &lhs, std::basic_string<CharT, Traits, Alloc> &rhs ) noexcept(/* see below */ | | (since C++17) |
专攻std::swap
算法std::basic_string
.交换lhs
和rhs
相当于lhs.swap(rhs)
...
参数
lhs, rhs | - | strings whose contents to swap |
---|
返回值
%280%29
复杂性
常量。
Exceptions noexcept specification: noexcept(noexcept(lhs.swap(rhs))) | (since C++17) |
---|
另见
swap | swaps the contents (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。