Name

swap function template — Swaps the contents of two maps

Synopsis

template <class Key, class T, class Comp, class Alloc>
  void swap(map<Key,T,Comp,Alloc>& x, map<Key,T,Comp,Alloc>& y);
template <class Key, class T, class Comp, class Alloc>
  void swap(multimap<Key,T,Comp,Alloc>& x, multimap<Key,T,Comp,Alloc>& y);

The swap function template specialization is equivalent to calling x.swap(y).