Difference between revisions of "cpp/utility/pair/swap2"
From cppreference.com
(noexcept) |
D41D8CD98F (Talk | contribs) m (use consistent parameter names, -noexcept rev, +see also) |
||
Line 19: | Line 19: | ||
===Exceptions=== | ===Exceptions=== | ||
− | + | {{noexcept|noexcept(lhs.swap(rhs))}} | |
− | + | ||
− | + | ||
− | + | ||
===See also=== | ===See also=== | ||
{{dsc begin}} | {{dsc begin}} | ||
+ | {{dsc inc|cpp/algorithm/dsc swap}} | ||
{{dsc end}} | {{dsc end}} | ||
Revision as of 04:02, 13 July 2014
template< class T1, class T2 > void swap( pair<T1,T2>& lhs, pair<T1,T2>& rhs ); |
||
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(lhs.swap(rhs)))
See also
swaps the values of two objects (function template) |