I am creating a std::map<a,b> where the ordering criteria is defined with a::operator<.
Is there any way at some point to change the type of the map so that it gets from now on ordered by another sorting algorithm on a? It would need to re-order the current content of the map too.
You would have to create another map, and copy the elements of the first map into the second, like so: