hash_map ++; , Visual Studio g++. - ++, Boost.Unordered, TR1, , , ++ 0x. , unordered_map unordered_set, hash_map hash_set, .
, -, hash_map - , std::string, . -, , operator() -, hash_map . :
struct MyCustomHash {
size_t operator() (const string& str) const {
return str.empty()? 0 : str[0];
}
};
hash_map<string, int, MyCustomHash> myHashMap;
myHashMap MyCustomHash - .
, !