c++ - ISO C++标准草案

标签 c++ standards c++11

在 ISO 标准 C++ 中:最新的工作草案是 n3291 ,它不是公开的。但是 n3290 可用。截至 2 月,草稿为 n3242。我现在可以知道 .. 哪个草案更适合成为最终草案?因为 n3242n3290 有很多不同?

在此链接中,他们还给出了 ..:当前工作草案为 n3242 ? (为什么不是n3290)

http://www.open-std.org/jtc1/sc22/wg21/

http://en.wikipedia.org/wiki/C%2B%2B0x

请告诉我应该遵循哪个草案是正确的(直到最终草案发布)?

最佳答案

有一段时间,n3291 可以从明显的 URL 获得(只需在维基百科链接中搜索 n3242 并将其替换为 n3291)。但我猜有人认为这与最终版本太接近,因此无法再访问。

因此维基百科没有链接到它,因为没有什么可以链接到。

当 n3291 可用时,我确实藏了一份拷贝。我没有进行详尽的搜索,但似乎没有实质性的变化;只有澄清。例如n3242的1.8(6)节是这样写的:

Unless an object is a bit-field or a base class subobject of zero size, the address of that object is the address of the first byte it occupies. Two distinct objects that are neither bit-fields nor base class subobjects of zero size shall have distinct addresses.

虽然 n3291 的同一部分内容如下:

Unless an object is a bit-field or a base class subobject of zero size, the address of that object is the address of the first byte it occupies. Two objects that are not bit-fields may have the same address if one is a subobject of the other or if at least one is a base class subobject of zero size and they are of different types; otherwise, they shall have distinct addresses.

(n3291 使用红色删除线和带下划线的蓝色文本来突出显示与 n3242 相比的变化,因此不难找到此示例。)

如果有人能提出令人信服的论据,证明我重新发布 n3291 是合法的,我会很乐意提供它。在下载之前,我当然不需要输入任何密码,甚至不需要点击协议(protocol)...

[更新:在这个答案的第一个版本中,我写的是“n3290”,而我的意思是“n3291”。奇怪的是,“工作草案”的数量高于“最终版本”。无论如何,一段时间内免费提供的是 n3291。]

[更新 2:N3337下一个 C++ 标准的初稿,它与 C++11 最终标准非常相似。见:

Do section numbers differ between the C++11 standard and the gratis draft N3337?

因此您可以选择免费草稿;官方标准之前的最后一个(N3242)和之后的第一个(N3337)。所有似乎都使用相同的段落编号。]

关于c++ - ISO C++标准草案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7238958/

相关文章:

c++ - GCC:函数包装器模板问题

c++ - GLSL 问题 : Multiple shaders in one program

c++ - 如何将 vector (或类似 vector )传递到可变参数模板中

c - 与聚合或 union 类型相关的严格别名

c++ - 为什么 std::ranges::filter_view 对象必须是非常量才能查询其元素?

c++ - 而在std::cout , what does it work for?之前使用左移运算符(<<)

c++ - 启动线程导致 abort()

c++ - 按 vector 旋转/乘以旋转矩阵

c++ - 如何在 Windows 8.1 上断开蓝牙 LE 设备

machine-learning - 一起或分开标准化/分解训练/测试?