std::pair::swap
From cppreference.com
void swap(pair& other); |
(since C++11) | |
Swaps first
with other.first
and second
with other.second
.
This function does not participate in overload resolution unless std::is_swappable_v<first_type> && std::is_swappable_v<second_type> |
(since C++17) |
Parameters
other | - | pair of values to swap |
Return value
(none)
Exceptions
(until C++17) | |
noexcept specification:
noexcept( std::is_nothrow_swappable<first_type>::value) && |
(since C++17) |
swaps the values of two objects (function template) |