I was using std::hash_map<char*,T>
and somehow managed to make it work but have now discovered that the default compare function, euqal_to<char*>
does a pointer compare rather than a string compare. I've fixed this by making my own compare type (using C's strcmp
and it's about 5 LOC) but I'd be slightly shocked if there wasn't one already as part of the STL.
So, is there a comparator for doing string comparison?