I’m using MS VC 2008 and for some projects Intel C++ compiler 11.0. Is it worth using tr1 features in production? Will they stay in new standard?
For example, now I use stdext::hash_map. TR1 defines std::tr1::unordered_map. But in MS implementation unordered_map is just theirs stdext::hash_map, templatized in another way.
My advice would be to use an alias for the namespace containing the TR1 items you use. This way, you’ll be able to “move” from using the TR1 version to the standard version when your compiler supports it.
for a C++0x compiler, the first line becomes:
and you can leave the rest alone.