void clear() const;
The member function calls erase( begin(), end()).
erase
(
begin
(),
end
())
See the related sample program.