Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/tuple/swap2"

From cppreference.com
< cpp‎ | utility‎ | tuple
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}}
{{ddcl list begin}}
+
{{dcl begin}}
{{ddcl list item | notes={{mark since c++11}} |
+
{{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 );
 
}}
 
}}
{{ddcl list end}}
+
{{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===
{{param list begin}}
+
{{par begin}}
{{param list item | lhs, rhs | tuples whose contents to swap}}
+
{{par | lhs, rhs | tuples whose contents to swap}}
{{param list end}}  
+
{{par end}}  
  
 
===Return value===
 
===Return value===
Line 23: Line 23:
 
===See also===
 
===See also===
  
{{dcl list begin}}
+
{{dsc begin}}
{{dcl list end}}
+
{{dsc end}}
  
 
[[de:cpp/utility/tuple/swap2]]
 
[[de:cpp/utility/tuple/swap2]]

Revision as of 20:18, 31 May 2013

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
 
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)))

See also