问题
Is there such a tool that is able to convert a code that uses some C++11 features to C++03 compatible code (perhaps using some third party libraries like Boost)?
回答1:
Because nobody has answered with an actual answer, the answer is "No". Just upgrade your toolchain. There are a lot of good reasons to do that anyway.
For Ubuntu and other Linux variants, you can even download the package in source form and compile it for your ancient system if you want to use a new toolchain on a very old system. Of course, if you then ship programs with this you will have to link libstdc++
statically or ship the shared library along with your program.
It's highly unlikely that anybody would ever write a converter since it's so easy to just upgrade your toolchain. It would be an interesting (and rather complex) hobby project. Maybe someone will someday write a C++11 compiler than compiles to C99. :-) That would probably be a whole lot easier.
来源:https://stackoverflow.com/questions/14762078/is-there-a-c11-to-c03-converter