title: c++, stl, map how sort with value, not key
body: <p>I want to sort elements in map container using only values not key. how to do it? I know that map can sort by key value, but how to do vice versa. I found same question in stackoverfrlow. I like this <a href="https://stackoverflow.com/a/2699101/1082727">solution</a>. However I want clarify what does it mean "dump in <code>pair&lt;K,V&gt;</code>". I don't want create special structure for that, it is not elegant. how do you implements this <a href="https://stackoverflow.com/a/2699101/1082727">solution</a>?</p>