This is what I tried but when I retrieve from the map I get nothing:
#include <iostream>
#include <map>

using namespace std;

struct strCompare
{
strCompare(){}
bool operator()(const std::string& str1,const std::string& str2)const
{
return str1.compare(str2)<=0;
}
};
typedef std::map<std::string, std::string, strCompare> mymap;

int main()
{ mymap m = mymap();
m["abc"]="def";
std::cout<<m["abc"];
}