Is it possible to swap all key values as pairs in the whole unordered_multimap in c++11?

86 Views Asked by At

I have an unordered_multimap with pairs as keys. I would like to swap the values in the pairs, in the whole map. Example: {pair<1,2>, 3} -> {pair<2,1>, 3}

I would like to iterate over the container and change all the keys. Duplicates can occur so that is why used multimap. Is this possible in c++11?

0

There are 0 best solutions below