Is there a C++11 to C++03 converter? [closed]

こ雲淡風輕ζ 提交于 2019-12-04 19:43:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!