swap

Syntax:

    #include <map>
    void swap( map& from );

The swap() function exchanges the elements of the current map with those of from. This function operates in constant time.