Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)?

like image 636
szx Avatar asked Feb 07 '13 22:02

szx


People also ask

What is STD C++11?

C++11 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++11 replaced the prior version of the C++ standard, called C++03, and was later replaced by C++14.

Is C ++ 14 faster than C++11?

C++14 is 2x slower than C++11 (not related to I/O) - Codeforces.

Can you convert CPP to C?

It is possible to implement all of the features of ISO Standard C++ by translation to C, and except for exception handling, it typically results in object code with efficiency comparable to that of the code generated by a conventional C++ compiler.


1 Answers

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.

like image 132
Omnifarious Avatar answered Sep 19 '22 12:09

Omnifarious