useful to sort automatically as you insert elements

Custome comparator

#include <set>
#include <string>
struct MyData
{
MyData(const std::string& str, int v) : key(str), value(v) {}
std::string key;
int value;
};
struct…