I have used it a number of times without problems, though I used it with gcc (both on windows and linux) and not Visual Studio.
For actual usage, the documentation is here.
You can specify how many buckets to reserve using
void resize(size_type n)
Regarding your issue with identifier T, I assume you have forgotten to replace a template argument, named T, with an actual type. If you can't figure it out, maybe paste a code snippet of how you are using the hash_map.
Example from the documentation:
#include <hash_map>
#include <iostream>
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
int main()
{
std::hash_map<const char*, int, hash<const char*>, eqstr> months;
months["january"] = 31;
months["february"] = 28;
months["march"] = 31;
months["april"] = 30;
months["may"] = 31;
months["june"] = 30;
months["july"] = 31;
months["august"] = 31;
months["september"] = 30;
months["october"] = 31;
months["november"] = 30;
months["december"] = 31;
std::cout << "september -> " << months["september"] << endl;
std::cout << "april -> " << months["april"] << endl;
std::cout << "june -> " << months["june"] << endl;
std::cout << "november -> " << months["november"] << endl;
}
Of course, you can use std::string instead of char* if you wish:
std::hash_map<std::string, int, hash<std::string>, eqstr> months;