C++03 是 C++ 的新版本吗?标准还是只是 C++98 的技术勘误表 (TC)?

发布于 2024-12-18 11:45:55 字数 465 浏览 3 评论 0原文

我很确定我在某个权威来源上读到过(我相信是在 WG21 页面上),C++03 不是 C++98 的技术勘误表,而是一个新的版本。 C++ 标准的发布。

但尽管如此,我在 GCC 和其他编译器中只看到 -std=c++98 开关,并且 Alf P Steinbach 做了一个 一些评论暗示它可能确实是一个 TC C++98。

那么,当我写“C++03”时,提及 C++98 就足够了吗?作为一个相关问题,使用术语“C++03”是否错误?因为我觉得如果真的是C++98 TC1的话,那么在我看来它就不能称为C++03了。正如我从未见过有人为 C99TC3 版本编写 C07 一样。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

下壹個目標 2024-12-25 11:45:55

是和不是。

C++03 (ISO C++14882:2003) 本身就是一个标准,它也“只是”TC1,因为它只是 C++98 的一组修正。

你可以说 C++03 就是 C++98 的本意,C++98 的实际措辞经过修改,使其表达了它的意思。

委员会自己的话

“ISO/IEC 14882 第一版于 1998 年发布。技术勘误于 2003 年获得批准。该标准再次发布为2003年版。

其中的无关句点只是逐字引用。

Wikipedia的话来说(这不是权威,但如果有错应该修复) :

“在标准正式发布后的几年里,委员会处理了缺陷报告,并于 2003 年发布了 C++ 标准的修正版本 ISO/IEC 14882:2003。”

然而,有人可能会说,值初始化是一件新事物,而不仅仅是一种修正。有人可能会争辩说,技术勘误表本身仅包含更正,而用这些更正修改的标准是另一回事,是一个新标准。在我看来,这两种观点在上下文中都是有意义的,尽管不是绝对独立于上下文的陈述。

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.

放肆 2024-12-25 11:45:55

这是一个全新的标准。我相信它开始只是一个TC,这就是为什么会出现混乱,而且它实际上只是一个错误修复版本。然而,还是有一些变化,值得知道您谈论的是 98 还是 03。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文