map::clear

void clear() const;

The member function calls erase( begin(), end()).

See the related sample program.