Difference between revisions of "cpp/utility/tuple/swap2"
From cppreference.com
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
m (Shorten template names. Use {{lc}} where appropriate.) |
||
Line 1: | Line 1: | ||
{{cpp/title | swap<small>(std::tuple)</small>}} | {{cpp/title | swap<small>(std::tuple)</small>}} | ||
{{cpp/utility/tuple/navbar}} | {{cpp/utility/tuple/navbar}} | ||
− | {{ | + | {{dcl begin}} |
− | {{ | + | {{dcl | notes={{mark since c++11}} | |
template< class... Types > | template< class... Types > | ||
void swap( tuple<Types...>& lhs, tuple<Types...>& rhs ); | void swap( tuple<Types...>& lhs, tuple<Types...>& rhs ); | ||
}} | }} | ||
− | {{ | + | {{dcl end}} |
Swaps the contents of {{tt|lhs}} and {{tt|rhs}}. Equivalent to {{c|lhs.swap(rhs)}}. | Swaps the contents of {{tt|lhs}} and {{tt|rhs}}. Equivalent to {{c|lhs.swap(rhs)}}. | ||
===Parameters=== | ===Parameters=== | ||
− | {{ | + | {{par begin}} |
− | {{ | + | {{par | lhs, rhs | tuples whose contents to swap}} |
− | {{ | + | {{par end}} |
===Return value=== | ===Return value=== | ||
Line 23: | Line 23: | ||
===See also=== | ===See also=== | ||
− | {{ | + | {{dsc begin}} |
− | {{ | + | {{dsc end}} |
[[de:cpp/utility/tuple/swap2]] | [[de:cpp/utility/tuple/swap2]] |
Revision as of 20:18, 31 May 2013
template< class... Types > void swap( tuple<Types...>& lhs, tuple<Types...>& rhs ); |
(since C++11) | |
Swaps the contents of lhs
and rhs
. Equivalent to lhs.swap(rhs).
Contents |
Parameters
lhs, rhs | - | tuples whose contents to swap |
Return value
(none)
Exceptions
noexcept specification:
noexcept(noexcept(lhs.swap(rhs)))