I’m using MinGW 4.5.2 and I’d like to use unordered_map from the tr1 namespace, not the one from std namespace that is enabled by passing -std=c++0x. I’m sure this can be done since there are two unordered_map files, and one is in the tr1 sub-directory.
Clarification:
I’m also compiling this code with msvc10 and it supports unordered_map in both namespaces but only in one location. So I’d like to make it compile with both compilers with changing as least as possible.
Include
<tr1/unordered_map>and usestd::tr1::unordered_map<>.EDIT:
To make it compile with both compilers you can use something like: