C++0x 和 C++11 有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9538701/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the difference between C++0x and C++11?
提问by Lazer
I see mixed usage of these two terms here on SO.
我在 SO 上看到这两个术语的混合用法。
C++11, also formerly known as C++0x ...
C++11,也称为C++0x ...
but I am not sure why.
但我不知道为什么。
- Why was it first called C++0x and then C++11?
- Also, what does the x stand for? My guess - like a variable?
- 为什么它首先被称为 C++0x,然后是 C++11?
- 另外,x代表什么?我的猜测 - 就像一个变量?
回答by Matthieu M.
C++ and C Standards are usually named after the year they are published in, which makes it easier to remember by.
C++ 和 C 标准通常以它们发布的年份命名,这样更容易记住。
For example, in C++, the original Standard was published in 1998, so we talk about C++98, and when we refer to its first correction, published in 2003, we talk about C++03.
例如,在 C++ 中,最初的标准发布于 1998 年,所以我们谈论的是 C++98,而当我们提到它于 2003 年发布的第一次更正时,我们谈论的是 C++03。
It had been purported that the next Standard after would be done for 2008, but since it was uncertain, it was dubbed C++0x, where the x
stood for either 8 or 9. In practice though, as we all know, the planning shifted and so we end-up with C++11.
据称之后的下一个标准将在 2008 年完成,但由于不确定,它被称为 C++0x,其中x
代表 8 或 9。但实际上,众所周知,计划发生了变化所以我们最终得到了 C++11。
Still, for the next version (C++1x), Bjarne Stroustrup stated his intent to do it in 5 years (so about 2016). For now, there are changes envisionned to the core language (concepts, modules and garbage collection), and the focus seems to be more on extending the library (filesystem for example), but it's still early so who knows!
尽管如此,对于下一个版本(C++1x),Bjarne Stroustrup 表示他打算在 5 年内完成(大约 2016 年)。目前,对核心语言(概念、模块和垃圾收集)进行了预想,重点似乎更多地放在扩展库(例如文件系统)上,但现在还为时过早,谁知道呢!
回答by Bill Lynch
C++0x was the name for the standard before it was released / finalized. Once it was finalized (in the year 2011), we were able to name it properly. That is, C++11.
C++0x 是标准发布/最终确定之前的名称。一旦完成(在 2011 年),我们就能够正确命名它。也就是说,C++11。
回答by Niklas B.
Because the standard was planned to be released / approved in 200x
, but actually was approved in 2011
.
因为该标准计划200x
在2011
.
回答by Mike Seymour
When work began on the new standard, in 1998 or so, no-one knew which year it would be finalised in - so the "x" stood for an unknown year, and a hope that it would be finalised within ten years or so.
当新标准在 1998 年左右开始工作时,没有人知道它会在哪一年完成——所以“x”代表未知的年份,并希望它会在十年左右的时间内完成。
In the end, it was finalised in 2011, and so the standard is now known colloquially as C++11, and officially as ISO/IEC 14882:2011.
最后,它在 2011 年定稿,因此该标准现在通俗地称为 C++11,正式名称为 ISO/IEC 14882:2011。
Now that that standard is official, work is continuing on the next; again, no-one knows when that will be done, but it's hoped that it will take less than a decade, and so it's colloquially known as C++1x.
现在该标准是正式的,接下来的工作仍在继续;再一次,没有人知道什么时候会完成,但希望它会花费不到十年的时间,所以它通俗地称为 C++1x。