c++ - Converting C++11 into equivalent C++98 code -


I want to use C1111, but unfortunately, to ensure binary compatibility with some proprietary libraries , Make sure that the code can be made with compilers, which only supports C ++ 98, do some C ++ 11 constructions (at least for those who do not require standard library support), their C + Is there a way to convert + 98 into equivalents?

For example:

  std :: vector & lt; Integer & gt; V = ...; (Auto & amp; i: v) std :: cout & lt; & Lt; I & lt; & Lt; '';   

changed

  std :: vector & lt; Int & gt; V = ...; (Std :: vector & lt; int & gt; :: iterator = v.begin (), end = v.end (); it! = End; ++ it) {int & i = * it; Std :: cout & lt; & Lt; I & lt; & Lt; ''; }   

Or something like that.

It would be possible that this conversion automatically and properly (for example, your parser in Pearl To create a source-to-source compiler using the part of the clang project (especially to write high-level tools) to resist writing.

Note that there are C ++ 11/14 structures, which can not be easily converted to a loop in the form of C ++ 98/03 code. Various templates, among others, come to mind.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -