I have a project working fine under MSVS 2010 SP1. I'm trying to convert it to MSVS 2012 RC. I had to change some stuff, mainly related to C++ header/lib paths and MFC custom stuff. But I have one last hurdle to clear.
In MSVC 2010, I'm using a lot of unordered_map<basic_string<TCHAR>, int>
or map<basic_string<TCHAR>, int>
. It compiles fine. But in MSVS 2012, I just get this error:
"The C++ standard doesn't provide a hash for this type"
After searching a bit on the net, I found out that MSVS 2012 should be more close to the C++11 standard, and that the standard only defines hash functions for basic types and 4 defined string types (among them string
and wstring
, but basic_string
not included).
So I changed all basic_string<TCHAR>
to wstring
but to no avail... I still get the same error.
What should I do to be able to compile my app again?