You can specify a comparator when creating the map (this is an optional constructor argument).
eg:.
bool my_compare(int x, int y) { return y < x; } std::map<int,T,bool(*)(int,int)> my_map(my_compare);
Please note that I need to explicitly specify the 3rd template parameter.
[Note: I would strongly advised you not to overload the operator < for execution > ...]
source share