std::swap(std::map)

From Cppreference

Jump to: navigation, search
 
template< class Key, class T, class Compare, class Allocator >

void swap( map<Key,T,Compare,Allocator> &lhs,

          map<Key,T,Compare,Allocator> &rhs );

Specializes the std::swap algorithm for std::map. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs).

Contents

[edit] Parameters

lhs, rhs - containers whose contents to swap

[edit] Return value

(none)

[edit] Complexity

Constant

[edit] See also

swap
swaps the contents
(public member function)