C++03 是 C++ 的新版本吗?标准还是只是 C++98 的技术勘误表 (TC)?
我很确定我在某个权威来源上读到过(我相信是在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是和不是。
C++03 (ISO C++14882:2003) 本身就是一个标准,它也“只是”TC1,因为它只是 C++98 的一组修正。
你可以说 C++03 就是 C++98 的本意,C++98 的实际措辞经过修改,使其表达了它的意思。
委员会自己的话:
其中的无关句点只是逐字引用。
用Wikipedia的话来说(这不是权威,但如果有错应该修复) :
然而,有人可能会说,值初始化是一件新事物,而不仅仅是一种修正。有人可能会争辩说,技术勘误表本身仅包含更正,而用这些更正修改的标准是另一回事,是一个新标准。在我看来,这两种观点在上下文中都是有意义的,尽管不是绝对独立于上下文的陈述。
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 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):
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.
这是一个全新的标准。我相信它开始只是一个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.