std::swap(std::pair)
From cppreference.com
Template:ddcl list begin <tr class="t-dcl ">
<td class="t-dcl-nopad">template< class T1, class T2 >
void swap( pair<T1,T2>& lhs, pair<T1,T2>& rhs );
</td>
void swap( pair<T1,T2>& lhs, pair<T1,T2>& rhs );
<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end
Swaps the contents of lhs
and rhs
. Equivalent to lhs.swap(rhs).
Contents |
Parameters
lhs, rhs | - | pairs whose contents to swap |
Return value
(none)
Exceptions
noexcept specification:
noexcept(noexcept(x.swap(y)))