<tbody>
</tbody>
<tbody class="t-dcl-rev ">
</tbody><tbody>
</tbody>
| |
|
|
| template< class CharT, class Traits, class Alloc > void swap( std::basic_string<CharT, Traits, Alloc> &lhs, std::basic_string<CharT, Traits, Alloc> &rhs );
|
|
(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 */);
|
|
(C++17以上) (C++20未満) |
| template< class CharT, class Traits, class Alloc > constexpr void swap( std::basic_string<CharT, Traits, Alloc> &lhs, std::basic_string<CharT, Traits, Alloc> &rhs ) noexcept(/* see below */);
|
|
(C++20以上) |
| | |
std::swap アルゴリズムを std::basic_string に対して特殊化します。 lhs と rhs の内容を入れ替えます。 lhs.swap(rhs) と同等です。
引数
戻り値
(なし)
計算量
一定。
例外
noexcept 指定:
noexcept(noexcept(lhs.swap(rhs)))
|
(C++17以上) |
関連項目