#include <functional>
#include <iostream>
#include <map>
#include <string>

using namespace std;

int main() {
	map<int, string, greater<int>> foo;
	//map<int, string> foo(greater<int>()); Doesn't work
	map<int, string, function<bool(const int&, const int&)>> bar([](const int& lhs, const int& rhs){ return lhs > rhs; });
	//map<int, string> bar([](const int& lhs, const int& rhs){ return lhs > rhs; }); Doesn't work
	
	foo[1] = "one"s;
	foo[2] = "two"s;
	bar[3] = "three"s;
	bar[4] = "four"s;
	
	for(auto& i : foo) {
		cout << i.first << ':' << i.second << endl;
	}
	
	for(auto& i : bar) {
		cout << i.first << ':' << i.second << endl;
	}
}