Namespaces
Variants
Views
Actions

std::swap(std::pair)

From cppreference.com
< cpp‎ | utility‎ | pair
Revision as of 18:05, 26 August 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

[edit] Parameters

lhs, rhs - pairs whose contents to swap

[edit] Return value

(none)

[edit] Exceptions

(none) (until C++11)
noexcept specification:  (since C++11)
noexcept(noexcept(x.swap(y)))
(since C++11)

[edit] See also