std::swap

std::swap

Defined in header <algorithm>
Defined in header <utility>
(until C++11)
(since C++11)
template< class T >
void swap( T& a, T& b );
(1)
template< class T2, std::size_t N >
void swap( T2 (&a)[N], T2 (&b)[N]);
(2) (since C++11)

Exchanges the given valu