[cfe-dev] Suggestion for C++ migration tool: tr1 removal
Marshall Clow
mclow.lists at gmail.com
Thu Feb 28 14:06:50 PST 2013
TR1 was a very successful add-on to C++03.
However, most (if not all) of the bits of TR1 are now part of the C++11 standard.
Some c++11 standard library implementations include the TR1 features (libstdc++, Dinkumware), while others (libc++) do not.
I think it would be great if the c++11 migration tool "migrated" away from using tr1 features in favor of using the ones in std.
For example:
#include <tr1/unordered_map>
int main()
{
std::tr1::unordered_map <int, int> ma;
std::cout << ma.size () << std::endl;
return 0;
}
should be rewritten to:
#include <unordered_map>
int main()
{
std::unordered_map <int, int> ma;
std::cout << ma.size () << std::endl;
return 0;
}
and so on.
Comments?
-- Marshall
More information about the cfe-dev
mailing list