std::basic_string<CharT,Traits,Allocator>::swap
From cppreference.com
< cpp | string | basic string
void swap( basic_string& other ); |
(until C++17) | |
void swap( basic_string& other ) noexcept(/* see below */); |
(since C++17) (constexpr since C++20) |
|
Exchanges the contents of the string with those of other. All iterators and references may be invalidated.
If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the allocators are exchanged using an unqualified call to non-member |
(since C++11) |
Contents |