std::swap(std::pair)

From Cppreference

Jump to: navigation, search
template<class T1, class T2>
void swap(pair<T1, T2>& x, pair<T1, T2>& y);

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

noexcept specification:  (C++11 feature)

noexcept(noexcept(x.swap(y)))

[edit] See also