Is C++03 a new version of the C++ Standard or just a Technical Corrigendum (TC) of C++98?

十年热恋 提交于 2019-11-29 05:33:50

问题


I'm pretty sure I read on an authoritative source somewhere (I believe it was on the WG21 pages) that C++03 was not a technical corrigendum of C++98 but that it was a new release of the C++ Standard.

But nontheless I see only -std=c++98 switch in GCC and others compilers and Alf P Steinbach made a few comments hinting at that it may indeed be a TC of C++98.

So when I'm writing about "C++03", does it suffice mentioning C++98? As a related question, is it even wrong to use the term "C++03"? Because I think if it is really C++98 TC1, then it seems to me it cannot be called C++03. Just as I've never seen someone write C07 for the C99TC3 release.


回答1:


Yes and no.

C++03 (ISO C++14882:2003) is a standard in its own right, and it is also "just" TC1 because it is only C++98 amended with a set of corrections.

You can say that C++03 is what C++98 was intended to be, the actual wording of C++98 revised to make it say what it was meant to say.

In the committee's own words:

“The first edition of ISO/IEC 14882 was published in 1998. A technical corrigendum was approved in 2003, . and the standard was published again as the 2003 edition.”

The extraneous period in there is just quoted literally.

In the words of Wikipedia (which is not an authority, but should be fixed if it’s wrong):

“For some years after the official release of the standard, the committee processed defect reports, and published a corrected version of the C++ standard, ISO/IEC 14882:2003, in 2003.”

One might argue, however, that value initialization was a new thing and not just a correction. And one might argue that the Technical Corrigendum itself consisted only of the corrections, while the standard amended with those corrections is a different thing, a new standard. Both of these points view make sense contextually, as I see it, although not as absolute context-independent statements.




回答2:


It is a whole new Standard. I believe that it began as just a TC, which is why the confusion occurs, and it certainly is effectively just a bugfix release. However, there were changes and it is worth knowing whether you're talking about 98 or 03.



来源:https://stackoverflow.com/questions/8285777/is-c03-a-new-version-of-the-c-standard-or-just-a-technical-corrigendum-tc

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