[英]Where do I find the current C or C++ standard documents?
For many questions the answer seems to be found in "the standard".对于许多问题,答案似乎可以在“标准”中找到。 However, where do we find that?
然而,我们从哪里找到呢? Preferably online.
最好是在线的。
Googling can sometimes feel futile, again especially for the C standards, since they are drowned in the flood of discussions on programming forums.谷歌搜索有时会感到徒劳,尤其是对于 C 标准,因为它们淹没在编程论坛上的大量讨论中。
To get this started, since these are the ones I am searching for right now, where are there good online resources for:首先,因为这些是我现在正在搜索的,所以哪里有好的在线资源:
As of
1st September 2014
September 2021, the best locations by price for the official C and C++ standards documents in PDF seem to be:截至
2014 年
9 月
1 日,
2021
年
9 月,PDF 格式的官方 C 和 C++ 标准文档的最佳价格位置似乎是:
C++20 – ISO/IEC 14882:2020: 198 CHF (about $217 US) from iso.org C++20 – ISO/IEC 14882:2020: 198 CHF(约 217 美元)来自 iso.org
C++17 – ISO/IEC 14882:2017: $90 NZD (about $65 US) from Standards New Zealand C++17 – ISO/IEC 14882:2017:新西兰标准 90 新西兰元(约合 65 美元)
C++14 – ISO/IEC 14882:2014: $90 NZD (about $65 US) from Standards New Zealand C++14 – ISO/IEC 14882:2014:新西兰标准 90 新西兰元(约合 65 美元)
C++11 – ISO/IEC 14882:2011: $60 from ansi.org or $60 from Techstreet C++11 – ISO/IEC 14882:2011: ansi.org 60 美元或Techstreet 60 美元
C++03 – INCITS/ISO/IEC 14882:2003: $30 from ansi.org C++03 – INCITS/ISO/IEC 14882:2003: ansi.org 30 美元
C++98 – ISO/IEC 14882:1998: $80 NZD (about $60 US) from Standards New Zealand C++98 – ISO/IEC 14882:1998:新西兰标准 80 新西兰元(约合 60 美元)
C17/C18 – INCITS/ISO/IEC 9899:2018: $116 from INCITS/ANSI / N2176 / c17_updated_proposed_fdis.pdf draft from November 2017 (Link broken, see Wayback Machine N2176 ) C17/C18 – INCITS/ISO/IEC 9899:2018: 116 美元来自 INCITS/ANSI / N2176/c17_updated_proposed_fdis.pdf 草案,2017 年 11 月(链接断开,参见Wayback Machine N2176 )
C11 – ISO/IEC 9899:2011: $30 $60 from ansi.org / WG14 draft version N1570 C11 – ISO/IEC 9899:2011:
$30 $60 from ansi.org / WG14 草案版本 N1570
C99 – INCITS/ISO/IEC 9899-1999(R2005): $60 from ansi.org / WG14 draft version N1256 C99 – INCITS/ISO/IEC 9899-1999(R2005): ansi.org/WG14草案版本 N1256 60 美元
C90 – ISO/IEC 9899:1990: $90 NZD (about $65 USD) from Standards New Zealand C90 – ISO/IEC 9899:1990:新西兰标准 90 新西兰元(约 65 美元)
Print copies of the standards are available from national standards bodies and ISO but are very expensive.标准的印刷副本可从国家标准机构和ISO 获得,但非常昂贵。
If you want a hardcopy of the C90 standard for much less money than above, you may be able to find a cheap used copy of Herb Schildt 's book The Annotated ANSI Standard at Amazon , which contains the actual text of the standard (useful) and commentary on the standard (less useful - it contains several dangerous and misleading errors).如果您想要一份 C90 标准的硬拷贝,但价格比上面少得多,您可以在亚马逊找到Herb Schildt的书The Annotated ANSI Standard的廉价二手副本,其中包含标准的实际文本(有用)和对标准的评论(不太有用 - 它包含几个危险和误导性的错误)。
The C99 and C++03 standards are available in book form from Wiley and the BSI (British Standards Institute): C99 和 C++03 标准可从 Wiley 和 BSI(英国标准协会)以书籍形式获得:
The working drafts for future standards are often available from the committee websites:未来标准的工作草案通常可从委员会网站获得:
If you want to get drafts from the current or earlier C/C++ standards, there are some available for free on the internet:如果您想从当前或更早的 C/C++ 标准中获取草稿,可以在 Internet 上免费获得一些草稿:
ANSI X3.159-198 (C89): I cannot find a PDF of C89, but it is almost the same as C90. ANSI X3.159-198 (C89):我找不到 C89 的 PDF,但它与 C90 几乎相同。 The only major differences are in the boilerplate and section numbering, although there are some slight textual differences
唯一的主要区别在于样板和部分编号,尽管有一些轻微的文本差异
ISO/IEC 9899:1990 (C90): (Almost the same as ANSI X3.159-198 (C89) except for the frontmatter and section numbering. There is at least one textual difference in section 6.5.7 (previously 3.5.7), where "a list" became "a brace-enclosed list" . Note that the conversion between ANSI and ISO/IEC Standard is seen inside this document, the document refers to its name as "ANSI/ISO: 9899/99" although this isn't the right name of the later made standard of it, the right name is "ISO/IEC 9899:1990") ISO/IEC 9899:1990 (C90):(除了前言和章节编号外,几乎与 ANSI X3.159-198 (C89) 相同。第 6.5.7 节(以前是 3.5.7)中至少有一处文本差异, 其中“列表”变成了“括号括起来的列表” 。请注意,在本文档中可以看到 ANSI 和 ISO/IEC 标准之间的转换,文档将其名称称为“ANSI/ISO: 9899/99”,尽管这不是后来制定的标准的正确名称,正确的名称是“ISO/IEC 9899:1990”)
TC1 for C90: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n423.pdf C90 的 TC1: http : //www.open-std.org/jtc1/sc22/wg14/www/docs/n423.pdf
There isn't a PDF link for TC2 on the WG14 website , sadly.遗憾的是, WG14 网站上没有 TC2 的 PDF 链接。
ISO/IEC 9899:1999 (C99 incorporating all three Technical Corrigenda): http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf ISO/IEC 9899:1999(C99 包含所有三个技术勘误表): http : //www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
An earlier version of C99 incorporating only TC1 and TC2: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf仅包含 TC1 和 TC2 的早期版本的 C99: http : //www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
Working draft for the original (ie pre-corrigenda) C99: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n843.htm (HTML) and http://www.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.pdf (PDF).工作草案原(即预勘误的内容)C99: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n843.htm (HTML)和HTTP://www.dkuug。 dk/JTC1/SC22/WG14/www/docs/n843.pdf (PDF)。 Note that there were two later working drafts: N869 and N878, but they seem to have been removed from the WG14 website, so this is the latest one available.
请注意,后来有两个工作草案:N869 和 N878,但它们似乎已从 WG14 网站上删除,因此这是可用的最新版本。
List of changes between C89/C90 and C99: http://port70.net/~nsz/c/c89/c9x_changes.html C89/C90 和 C99 之间的变化列表: http : //port70.net/~nsz/c/c89/c9x_changes.html
TC1 for C99 (only the TC, not the standard incorporating it): http://www.open-std.org/jtc1/sc22/wg14/www/docs/9899tc1/n32071.PDF C99 的 TC1(只有 TC,不是包含它的标准): http : //www.open-std.org/jtc1/sc22/wg14/www/docs/9899tc1/n32071.PDF
TC2 for C99 (only the TC, not the standard incorporating it): http://www.open-std.org/jtc1/sc22/wg14/www/docs/9899-1999_cor_2-2004.pdf C99 的 TC2(只有 TC,不是包含它的标准): http : //www.open-std.org/jtc1/sc22/wg14/www/docs/9899-1999_cor_2-2004.pdf
ISO/IEC 9899:2011 (C11): http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf ISO/IEC 9899:2011 (C11): http : //www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
ISO/IEC 9899:2011/Cor 1:2012 (C11's only technical corrigendum): This can be viewed at https://www.iso.org/obp/ui/#iso:std:iso-iec:9899:ed-3:v1:cor:1:v1:en but cannot be downloaded. ISO/IEC 9899:2011/Cor 1:2012(C11 的唯一技术勘误表):可在https://www.iso.org/obp/ui/#iso:std:iso-iec:9899:ed-查看3:v1:cor:1:v1:en但无法下载。 It is the actual corrigendum, not a draft.
这是实际的更正,而不是草稿。
ISO/IEC 9899:2018 (C17/C18): https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf (N2176) ISO/IEC 9899:2018 (C17/C18): https ://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis 。 pdf (N2176)
C2x work-in-progress - latest working draft as of 12th April 2020 (N2596): http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2596.pdf C2x 正在进行中 - 截至 2020 年 4 月 12 日的最新工作草案(N2596): http : //www.open-std.org/jtc1/sc22/wg14/www/docs/n2596.pdf
ISO/IEC 14882:1998 (C++98):http://www.lirmm.fr/~ducour/Doc-objets/ISO+IEC+14882-1998.pdf ISO/IEC 14882:1998 (C++98):http ://www.lirmm.fr/~ducour/Doc-objets/ISO+IEC+14882-1998.pdf
ISO/IEC 14882:2003 (C++03): https://cs.nyu.edu/courses/fall11/CSCI-GA.2110-003/documents/c++2003std.pdf ISO/IEC 14882:2003 (C++03): https : //cs.nyu.edu/courses/fall11/CSCI-GA.2110-003/documents/c++2003std.pdf
ISO/IEC 14882:2011 (C++11): http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf ISO/IEC 14882:2011 (C++11): http : //www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf
ISO/IEC 14882:2014 (C++14): https://github.com/cplusplus/draft/blob/master/papers/n4140.pdf?raw=true ISO/IEC 14882:2014 (C++14): https : //github.com/cplusplus/draft/blob/master/papers/n4140.pdf? raw =true
ISO/IEC 14882:2017 (C++17): http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf ISO/IEC 14882:2017 (C++17): http : //www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf
ISO/IEC 14882:2020 (C++20): https://isocpp.org/files/papers/N4860.pdf ISO/IEC 14882:2020 (C++20): https : //isocpp.org/files/papers/N4860.pdf
ISO/IEC 14882:2023 (C++23 work-in-progress. Working draft dated March 17 2021): http://open-std.org/JTC1/SC22/WG21/docs/papers/2021/n4885.pdf ISO/IEC 14882:2023(C++23 正在进行中。工作草案日期为 2021 年 3 月 17 日): http : //open-std.org/JTC1/SC22/WG21/docs/papers/2021/n4885.pdf
Note that these documents are not the same as the standard, though the versions just prior to the meetings that decide on a standard are usually very close to what is in the final standard.请注意,这些文件与标准不同,尽管会议之前决定标准的版本通常与最终标准中的版本非常接近。 The FCD (Final Committee Draft) versions are password protected;
FCD(最终委员会草案)版本受密码保护; you need to be on the standards committee to get them.
你需要加入标准委员会才能得到它们。
Even though the draft versions might be very close to the final ratified versions of the standards, some of this post's editors would strongly advise you to get a copy of the actual documents — especially if you're planning on quoting them as references.尽管草案版本可能与标准的最终批准版本非常接近,但本文的一些编辑强烈建议您获取实际文档的副本——尤其是如果您打算引用它们作为参考。 Of course, starving students should go ahead and use the drafts if strapped for cash.
当然,如果手头拮据,挨饿的学生应该继续使用汇票。
It appears that, if you are willing and able to wait a few months after ratification of a standard, to search for "INCITS/ISO/IEC" instead of "ISO/IEC" when looking for a standard is the key.看来,如果您愿意并且能够在标准批准后等待几个月,那么在寻找标准时搜索“INCITS/ISO/IEC”而不是“ISO/IEC”是关键。 By doing so, one of this post's editors was able to find the C11 and C++11 standards at reasonable prices.
通过这样做,本文的一位编辑能够以合理的价格找到 C11 和 C++11 标准。 For example, if you search for "INCITS/ISO/IEC 9899:2011" instead of "ISO/IEC 9899:2011" on webstore.ansi.org you will find the reasonably priced PDF version.
例如,如果您在webstore.ansi.org上搜索“INCITS/ISO/IEC 9899:2011”而不是“ISO/IEC 9899:2011”,您将找到价格合理的 PDF 版本。
The site https://wg21.link/ provides short-URL links to the C++ current working draft and draft standards, and committee papers:站点https://wg21.link/提供指向 C++ 当前工作草案和标准草案以及委员会文件的短 URL 链接:
The current draft of the standard is maintained as LaTeX sources on Github .该标准的当前草案在Github上作为 LaTeX 源进行维护。 These sources can be converted to HTML using cxxdraft-htmlgen .
可以使用cxxdraft-htmlgen将这些源转换为 HTML。 The following sites maintain HTML pages so generated:
以下站点维护如此生成的 HTML 页面:
Tim Song also maintains generated HTML and PDF versions of the Networking TS and Ranges TS. Tim Song还维护生成的 HTML 和 PDF 版本的 Networking TS 和 Ranges TS。
The POSIX standard (IEEE 1003.1) requires a compliant operating system to include a C compiler. POSIX标准 (IEEE 1003.1) 要求兼容的操作系统包含 C 编译器。 This compiler must in turn be compliant with the C standard, and must also support various extensions defined in the "System Interfaces" section of POSIX (such as the
off_t
data type, the <aio.h>
header, the clock_gettime()
function and the _POSIX_C_SOURCE
macro.)该编译器又必须符合 C 标准,并且还必须支持 POSIX 的“系统接口”部分中定义的各种扩展(例如
off_t
数据类型、 <aio.h>
标头、 clock_gettime()
函数和_POSIX_C_SOURCE
宏。)
So if you've tried to look up a particular function, been informed "This function is part of POSIX, not the C standard", and wondered why an operating system standard was mandating compiler features and language extensions... now you know!因此,如果您尝试查找特定函数,被告知“该函数是 POSIX 的一部分,而不是 C 标准的一部分”,并且想知道为什么操作系统标准强制要求编译器功能和语言扩展……现在您知道了!
POSIX.1-2001: The System Interfaces section can be downloaded as a separate document from https://mirror.math.princeton.edu/pub/oldlinux/download/c951.pdf . POSIX.1-2001:系统接口部分可以作为单独的文档从https://mirror.math.princeton.edu/pub/oldlinux/download/c951.pdf下载。 Section 1.7 states that the relevant version of the C standard is C99.
第 1.7 节指出 C 标准的相关版本是 C99。
The "Shell and Utilities" section ( https://mirror.math.princeton.edu/pub/oldlinux/download/c952.pdf ) mandates not only that a C99-compliant compiler should exist, but that it should be invokable from the command line under the name "c99". “Shell 和实用程序”部分 ( https://mirror.math.princeton.edu/pub/oldlinux/download/c952.pdf ) 要求不仅应该存在符合 C99 的编译器,而且应该可以从名为“c99”的命令行。 One way in which this can be implemented is to place a shell script called "c99" in /usr/bin, which calls gcc with the
-std=c99
option added to the list of command-line parameters, and blocks any competing standards from being specified.实现这一点的一种方法是在 /usr/bin 中放置一个名为“c99”的 shell 脚本,它调用 gcc 并将
-std=c99
选项添加到命令行参数列表中,并阻止任何竞争标准被指定。
POSIX.1-2001 had two technical corrigenda, one dated 2002 and one dated 2004. I don't think they're incorporated into the documents as linked above. POSIX.1-2001 有两份技术勘误表,一份是 2002 年的,另一份是 2004 年的。我认为它们没有被合并到上面链接的文档中。 There's an online HTML version incorporating the corrigenda at https://pubs.opengroup.org/onlinepubs/009695399/ - but I should add that I've had some trouble with the search box and so using Google to search the site is probably your best bet.
在https://pubs.opengroup.org/onlinepubs/009695399/ 上有一个包含勘误表的在线 HTML 版本 - 但我应该补充一点,我在搜索框方面遇到了一些问题,因此使用 Google 搜索该网站可能是您的最好的选择。
There is a paywalled link to download the first corrigendum at https://standards.ieee.org/standard/1003_1-2001-Cor1-2002.html .在https://standards.ieee.org/standard/1003_1-2001-Cor1-2002.html有一个付费链接可以下载第一个勘误表。
There is also a paywalled link for the second at https://standards.ieee.org/standard/1003_1-2001-Cor2-2004.html在https://standards.ieee.org/standard/1003_1-2001-Cor2-2004.html 上还有一个付费链接
There is a draft version of POSIX.1-2008 at http://www.open-std.org/jtc1/sc22/open/n4217.pdf . http://www.open-std.org/jtc1/sc22/open/n4217.pdf 上有 POSIX.1-2008 的草稿版本。
POSIX.1-2008 also had two technical corrigenda, the latter of the two being dated 2016. There is an online HTML version of the standard incorporating the corrigenda at https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ - though, again, I have had situations where the site's own search box wasn't good for finding information. POSIX.1-2008 也有两个技术勘误,两个中的后者是 2016 年的。在https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/有一个包含勘误的标准的在线 HTML 版本 - 虽然再次,我遇到过网站自己的搜索框不适合查找信息的情况。
There is an online HTML version of POSIX.1-2017 at https://pubs.opengroup.org/onlinepubs/9699919799/ - though, again, I recommend using Google instead of that site's searchbox. https://pubs.opengroup.org/onlinepubs/9699919799/ 上有 POSIX.1-2017 的在线 HTML 版本 - 不过,我再次建议使用 Google 而不是该网站的搜索框。 According to the Open Group website "IEEE 1003.1-2017 ... is a revision to the 1003.1-2008 standard to rollup the standard including its two technical corrigenda (as-is)".
根据Open Group 网站的说法,“IEEE 1003.1-2017 ...是对 1003.1-2008 标准的修订,以汇总该标准,包括其两个技术勘误表(原样)”。 Linux manpages describe it as "technically identical" to POSIX.1-2008 with Technical Corrigenda 1 and 2 applied.
Linux 联机帮助页将其描述为与 POSIX.1-2008“技术上相同”,并应用了技术勘误表 1 和 2。 This is therefore not a major revision and does not change the value of the
_POSIX_C_SOURCE
macro.因此,这不是主要修订,并且不会更改
_POSIX_C_SOURCE
宏的值。
Online versions of the standard can be found:可以找到该标准的在线版本:
The following all draft versions of the standard :以下是标准的所有草案版本:
All the following are freely downloadable以下所有内容均可免费下载
(many of these can be found at this main GitHub link ) (其中许多可以在这个主要的 GitHub 链接中找到)
2021-03-17: N4885 2021-03-17: N4885
2020-12-15: N4878 2020-12-15: N4878
2020-10-18: N4868 2020-10-18: N4868
2020-04-08: N4861 2020-04-08: N4861
2020-01-14: N4849 2020-01-14: N4849
2019-11-27: N4842 2019-11-27: N4842
2019-10-08: N4835 git 2019-10-08: N4835 git
2019-08-15: N4830git 2019年8月15日: N4830混帐
2019-06-17: N4820 git 2019-06-17: N4820 git
2019-03-15: N4810 git 2019-03-15: N4810 git
2019-01-21: N4800 git 2019-01-21: N4800 git
2018-11-26: N4791 git 2018-11-26: N4791 git
2018-10-08: N4778 git 2018-10-08: N4778 git
2018-07-07: N4762 git 2018-07-07: N4762 git
2018-05-07: N4750 git 2018-05-07: N4750 git
2018-04-02: N4741 git 2018-04-02 : N4741 git
2018-02-12: N4727 git 2018-02-12 : N4727 git
2017-11-27: N4713 git 2017-11-27: N4713 git
2017-10-16: N4700 git 2017-10-16: N4700 git
2017-07-30: N4687 git 2017-07-30: N4687 git
This seems to be the new standard:这似乎是新标准:
These version requires Authentication这些版本需要身份验证
2017-03-21:N4660 is the C++17 Draft Standard 2017-03-21:N4660是 C++17 草案标准
The following all draft versions of the standard :以下是标准的所有草案版本:
All the following are freely downloadable以下所有内容均可免费下载
2017-03-21: N4659 git 2017-03-21: N4659 git
2017-02-06: N4640 git 2017-02-06: N4640 git
2016-11-28: N4618git 2016-11-28: N4618git
2016-07-12: N4606git 2016-07-12: N4606git
2016-05-30: N4594git 2016-05-30: N4594git
2016-03-19: N4582git 2016-03-19: N4582git
2015-11-09: N4567git 2015-11-09: N4567git
2015-05-22: N4527git 2015-05-22: N4527git
2015-04-10: N4431git 2015-04-10: N4431git
2014-11-19: N4296git 2014-11-19: N4296git
This seems to be the old C++14 standard :这似乎是旧的 C++14 标准:
These version requires Authentication这些版本需要身份验证
2014-10-07:N4140git Essentially C++14 with minor errors and typos corrected 2014-10-07:N4140git本质上是 C++14,修正了小错误和拼写错误
2014-09-02:N4141 git Standard C++14 2014-09-02:N4141 git标准 C++14
2014-03-02:N3937 2014-03-02:N3937
2014-03-02:N3936 git 2014-03-02:N3936 git
The following all draft versions of the standard :以下是标准的所有草案版本:
All the following are freely downloadable以下所有内容均可免费下载
2013-10-13: N3797git 2013-10-13: N3797git
2013-05-16: N3691 2013-05-16: N3691
2013-05-15: N3690 2013-05-15: N3690
2012-11-02: N3485 2012-11-02: N3485
2012-02-28: N3376 2012-02-28: N3376
2012-01-16: N3337 git Essentially C++11 with minor errors and typos corrected 2012-01-16: N3337 git本质上是 C++11,修正了一些小错误和拼写错误
This seems to be the old C++11 standard :这似乎是旧的 C++11 标准:
This version requires Authentication此版本需要身份验证
2011-04-05:N3291 C++11 (Or Very Close) 2011-04-05:N3291 C++11(或非常接近)
The following all draft versions of the standard :以下是标准的所有草案版本:
All the following are freely downloadable以下所有内容均可免费下载
2011-02-28: N3242 (differences from N3291 very minor) 2011-02-28: N3242 (与N3291 的差异很小)
2010-11-27: N3225 2010-11-27: N3225
2010-08-21: N3126 2010-08-21: N3126
2010-03-29: N3090 2010-03-29: N3090
2010-02-16: N3035 2010-02-16: N3035
2009-11-09: N3000 2009-11-09: N3000
2009-09-25: N2960 2009-09-25: N2960
2009-06-22: N2914 2009-06-22: N2914
2009-03-23: N2857 2009-03-23: N2857
2008-10-04: N2798 2008-10-04: N2798
2008-08-25: N2723 2008-08-25: N2723
2008-06-27: N2691 2008-06-27: N2691
2008-05-19: N2606 2008-05-19: N2606
2008-03-17: N2588 2008-03-17: N2588
2008-02-04: N2521 2008-02-04: N2521
2007-10-22: N2461 2007-10-22: N2461
2007-08-06: N2369 2007-08-06: N2369
2007-06-25: N2315 2007-06-25: N2315
2007-05-07: N2284 2007-05-07: N2284
2006-11-03: N2134 2006-11-03: N2134
2006-04-21: N2009 2006-04-21: N2009
2005-10-19: N1905 2005-10-19: N1905
2005-04-27: N1804 2005-04-27: N1804
This seems to be the old C++03 standard:这似乎是旧的 C++03 标准:
All the below versions require Authentication以下所有版本都需要身份验证
2004-11-05:N1733 2004-11-05:N1733
2004-07-16:N1655 Unofficial 2004-07-16:N1655非官方
2004-02-07:N1577 C++03 (Or Very Close) 2004-02-07:N1577 C++03(或非常接近)
2001-09-13: N1316 Draft Expanded Technical Corrigendum 2001-09-13: N1316扩展技术勘误草案
1997-00-00: N1117 Draft Expanded Technical Corrigendum 1997-00-00:N1117 扩展技术勘误草案
The following all draft versions of the standard :以下是标准的所有草案版本:
All the following are freely downloadable以下所有内容均可免费下载
1996-00-00: N0836 Draft Expanded Technical Corrigendum 1996-00-00: N0836扩展技术勘误草案
1995-00-00: N0785 Working Paper for Draft Proposed International Standard for Information Systems - Programming Language C++ 1995-00-00:N0785 信息系统国际标准草案的工作文件 - 编程语言 C++
2021 / 2020 / 2019 / 2018 / 2017 / 2016 / 2015 / 2014 / 2013 / 2012 / 2011 2021 / 2020 / 2019 / 2018 / 2017 / 2016 / 2015 / 2014 / 2013 / 2012 / 2011
C99 is available online . C99可在线获得。 Quoted from www.open-std.org :
引自www.open-std.org :
The lastest publically available version of the standard is the combined C99 + TC1 + TC2 + TC3, WG14 N1256 , dated 2007-09-07.
该标准的最新公开版本是组合 C99 + TC1 + TC2 + TC3, WG14 N1256 ,日期为 2007-09-07。 This is a WG14 working paper, but it reflects the consolidated standard at the time of issue.
这是 WG14 工作文件,但它反映了发布时的合并标准。
Draft Links:草稿链接:
C++11 (+editorial fixes): N3337 HTML , PDF C++11(+编辑修复):N3337 HTML 、 PDF
C++14 (+editorial fixes): N4140 HTML , PDF C++14(+编辑修复):N4140 HTML 、 PDF
C11 N1570 ( text ) C11 N1570 (文字)
Drafts of the Standard are circulated for comment prior to ratification and publication.
在批准和出版之前,标准的草案将被分发以征求意见。
Note that a working draft is not the standard currently in force, and it is not exactly the published standard
请注意,工作草案不是当前生效的标准,也不完全是已发布的标准
您可能会发现 C++0x 的国际标准草案很有用。
ISO standards cost money, from a moderate amount (for a PDF version), to a bit more (for a book version). ISO 标准需要花钱,从中等(对于 PDF 版本)到更多(对于书籍版本)。
While they aren't finalised however, they can usually be found online, as drafts.然而,虽然它们还没有最终确定,但它们通常可以在网上找到,作为草稿。 Most of the times the final version doesn't differ significantly from the last draft, so while not perfect, they'll suit just fine.
大多数情况下,最终版本与上一稿没有太大区别,因此虽然不完美,但它们很适合。
The C99 and C++03 standards are available in book form from Wiley: C99 和 C++03 标准可从 Wiley 以书籍形式获得:
Plus, as already mentioned, the working draft for future standards is often available from the committee websites:另外,正如已经提到的,未来标准的工作草案通常可以从委员会网站上获得:
The C-201x draft is available as N1336 , and the C++0x draft as N3225 . C- 201x草案可用作N1336 ,C++0x 草案可用作N3225 。
The text of a draft of the ANSI C standard (aka C.89) is available online. ANSI C 标准(又名 C.89)草案的文本可在线获取。 This was standardized by the ANSI committee prior to acceptance by the ISO C Standard (C.90), so the numbering of the sections differ (ANSI sections 2 through 4 correspond roughly to ISO sections 5 through 7), although the content is (supposed to be) largely identical.
在 ISO C 标准 (C.90) 接受之前,这是由 ANSI 委员会标准化的,因此各部分的编号不同(ANSI 部分 2 到 4 大致对应于 ISO 部分 5 到 7),尽管内容是(假设是)在很大程度上相同。
The ISO C and C++ standards are bloody expensive. ISO C 和 C++ 标准非常昂贵。 On the other hand, the INCITS republishes them for a lot less.
另一方面,INCITS 重新发布它们的价格要低得多。 http://www.techstreet.com/ seems to have the PDF for $30 (search for INCITS/ISO/IEC 14882:2003).
http://www.techstreet.com/似乎有 30 美元的 PDF(搜索 INCITS/ISO/IEC 14882:2003)。
Hardcopy versions are available, too.也有硬拷贝版本。 Look for the British Standards Institute versions, published by Wiley.
查找由 Wiley 出版的英国标准协会版本。
The actual standards documents may not be the most useful.实际的标准文件可能不是最有用的。 Most compilers do not fully implement the standards and may sometimes actually conflict.
大多数编译器并没有完全实现标准,有时可能会发生实际冲突。 So the compiler documentation that you would already have will be more useful.
因此,您已经拥有的编译器文档将更有用。 Additionally, the documentation will contain platform-specific remarks and notes on any caveats.
此外,该文档将包含特定于平台的备注和有关任何警告的注释。
Although not an actual standard, there is an amendment to ISO C (C89/90) called C94/95, or Normative Addendum 1. It was integrated into C99, although some compilers such as Clang allow you to specifiy -std=c94
on the command line.虽然不是一个实际的标准,有一个修正案称为C94 ISO C(C89 / 90)/ 95,或标准附录1.它被集成到C99,尽管一些编译器,如锵允许你specifiy
-std=c94
上的命令行。 ISO/IEC 9899:1990/Amd 1:1995 can be purchased for a hefty price from SAI GLOBAL (PDF or hard copy). ISO/IEC 9899:1990/Amd 1:1995 可以从SAI GLOBAL (PDF 或硬拷贝)以高价购买。
A summary of the document can be found here .可以在此处找到该文档的摘要。
When the (then draft) ANSI C Standard was being considered for adoption of an International Standard in 1990, there were several objections because it didn't address internationalization issues.
当(当时的草案)ANSI C 标准在 1990 年被考虑采用国际标准时,有几个反对意见,因为它没有解决国际化问题。 Because the Standard had already been several years in the making, it was agreed that a few changes would be made to provide the basis (for example, the functions in subclause 7.10.7 were added), and work would be carried out separately to provide proper internationalization of the Standard.
由于该标准已经制定了几年,因此同意进行一些更改以提供基础(例如,增加了第 7.10.7 条中的功能),并将单独开展工作以提供标准的适当国际化。 This work has culminated in Normative Addendum 1.
这项工作在规范性附录 1 中达到了高潮。
Normative Addendum 1 embodies C's reaction to both the limitations and promises of international character sets.
规范附录 1 体现了 C 对国际字符集的限制和承诺的反应。 Digraphs and the header were meant to improve the appearance of C programs written in national variants of ISO 646 without, eg, { or } characters.
有向图和标题旨在改善用 ISO 646 的国家变体编写的 C 程序的外观,没有 { 或 } 字符。 On the other end of the spectrum, the facilities connected to and extend the old Standard's barely adequate basis into a complete and consistent set of utilities for handling wide characters and multibyte strings.
另一方面,这些工具连接到旧标准勉强足够的基础并将其扩展为一组完整且一致的实用程序,用于处理宽字符和多字节字符串。
This document summarizes Normative Addendum 1. It is intended to quickly inform readers who are already familiar with the Standard;
本文件总结了规范性附录 1。旨在快速通知已经熟悉该标准的读者; it does not, and cannot, introduce the complex subject matter behind NA1, nor can it replace the original document as a reference manual.
它没有也不能介绍NA1背后的复杂主题,也不能代替原始文档作为参考手册。 (Nevertheless, it tries to be as accurate as possible, and its author would like to hear about any errors or omissions.)
(尽管如此,它会尽可能准确,作者希望了解任何错误或遗漏。)
http://c0x.coding-guidelines.com/ contains a searchable, HTML-based version of the C standard. http://c0x.coding-guidelines.com/包含C标准的基于HTML的可搜索版本。 Actually, a slightly modified version:
实际上,是一个稍微修改的版本:
This web site contains a modified version of N1256.
该网站包含N1256的修改版本。 It includes wording that has been deleted from C99 (ie, in struck through form) and wording that does used to appear in C99 (ie, in underlined form).
它包括已从C99中删除的措辞(即以删除线的形式)和曾经出现在C99中的措辞(即以下划线的形式)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.