I find it easier to pick up OS'es and Compilers (including versions as
required), and work around their personalities. Using OS/Compilers,
I've got code that cross compiles cleanly on Windows, Mac OS, and
Linux using Clang, Comeau, ICC/ICPC, VC++. And the programs are
correct.
Surely, you should not use __GNUC__ to distinguish between libc++ and
libstdc++. Here, I will be out of luck if I, for example, use gcc 4.4
on MacOS (compiled via MacPorts).
>>> 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.
>>
>> Sounds good! If you are not going to work on it in immediate future,
>> please put this text in
>> http://clang.llvm.org/docs/ClangTools.html#ideas-for-new-tools
>
> I went ahead and committed this as r176423, to ensure that it does not
get lost.
So … how would you use the rewriting framework to change include file
names?
For example,
change: #include <tr1/unordered_map>
to: #include <unordered_map>
Or the more general - how do you change preprocessor directives?
We currently search for the text, and create replacements based on that.