Are trigraphs still valid C++?

时光毁灭记忆、已成空白 提交于 2019-12-08 17:09:55

问题


We all know about the historical curiosity that is digraphs and trigraphs, but with all the changes made to C++ in recent years I'm curious: are they valid C++14? How about C++17?


回答1:


Trigraphs are currently valid, but won't be for long!

Trigraphs were proposed for deprecation in C++0x, which was released as C++11. This was opposed by IBM, speaking on behalf of itself and other users of C++, and as a result trigraphs were retained in C++0x. Trigraphs were then proposed again for removal (not only deprecation) in C++17. This passed a committee vote, and trigraphs are expected to be removed from C++17 despite the opposition from IBM and others. Existing code that uses trigraphs can be supported by translating from the physical source files (parsing trigraphs) to the basic source character set that does not include trigraphs. [Wikipedia]

Digraphs, however, are sticking around for now.



来源:https://stackoverflow.com/questions/27678297/are-trigraphs-still-valid-c

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