How to Find the C++11 Standard Papers

Where can I find the C++11 standard papers?

You can get the full, final standard directly from the ISO, or some national bodies.

You probably don't want to get in a hurry though. The ANSI (for one) normally re-publishes an official version with identical technical material -- basically the only change is saying "ANSI/ISO" on the the title page instead of just "ISO". At least for past versions, however, the price has been much more reasonable (~$30US instead of ~$400US).

Edit: As expected, the standard is now available for $30US.

Where do I find the current C or C++ standard documents?

PDF versions of the standard

As of 1st September 2014 March 2022, the best locations by price for the official C and C++ standards documents in PDF seem to be:

  • C++20 – ISO/IEC 14882:2020: 212 CAD (about $165 US) from csagroup.org

  • C++17 – ISO/IEC 14882:2017: $90 NZD (about $65 US) from Standards New Zealand

  • C++14 – ISO/IEC 14882:2014: $90 NZD (about $65 US) from Standards New Zealand

  • C++11 – ISO/IEC 14882-2011: $60 from ansi.org or $60 from Techstreet

  • C++03 – INCITS/ISO/IEC 14882:2003: $30 from ansi.org

  • C++98 – ISO/IEC 14882:1998: $95 NZD (about $65 US) from Standards New Zealand

  • 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)

  • C11 – ISO/IEC 9899:2011: $60 from ansi.org / WG14 draft version N1570

  • C99 – INCITS/ISO/IEC 9899-1999(R2005): $60 from ansi.org / WG14 draft version N1256

  • C90 – ISO/IEC 9899:1990: $90 NZD (about $65 USD) from Standards New Zealand

Non-PDF electronic versions of the standard

Warning: most copies of standard drafts are published in PDF format, and errors may have been introduced if the text/HTML was transcribed or automatically generated from the PDF.

  • C89 – Draft version in ANSI text format: (https://web.archive.org/web/20161223125339/http://flash-gordon.me.uk/ansi.c.txt)
  • C89 – Draft version as HTML document: (http://port70.net/~nsz/c/c89/c89-draft.html)
  • C90 TC1; ISO/IEC 9899 TCOR1, single-page HTML document: (http://www.open-std.org/jtc1/sc22/wg14/www/docs/tc1.htm)
  • C90 TC2; ISO/IEC 9899 TCOR2, single-page HTML document: (http://www.open-std.org/jtc1/sc22/wg14/www/docs/tc2.htm)
  • C99 – Draft version (N1256) as HTML document: (http://port70.net/~nsz/c/c99/n1256.html)
  • C11 – Draft version (N1570) as HTML document: (http://port70.net/~nsz/c/c11/n1570.html)
  • C++11 – Working draft (N3337) as plain text document: (http://port70.net/~nsz/c/c%2B%2B/c%2B%2B11_n3337.txt)

(The site hosting the plain text version of the C++11 working draft also has some C++14 drafts in this format. But none of them are copies of the final working draft, N4140.)

Print versions of the standard

Print copies of the standards are available from national standards bodies and ISO but are very expensive.

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).

The C99 and C++03 standards are available in book form from Wiley and the BSI (British Standards Institute):

  • C++03 Standard on Amazon
  • C99 Standard on Amazon

Standards committee draft versions (free)

The working drafts for future standards are often available from the committee websites:

  • C++ committee website
  • C committee website

If you want to get drafts from the current or earlier C/C++ standards, there are some available for free on the internet:

For C:

  • ANSI X3.159-198 (C89):
    I cannot find a PDF of C89, but it is almost the same as 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")

  • TC1 for C90: 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.

  • ISO/IEC 9899:1999 (C99 incorporating all three Technical Corrigenda):
    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

  • Working draft for the original (i.e. 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).
    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.

  • List of changes between C89/C90 and 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

  • 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

  • ISO/IEC 9899:2011 (C11):
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

    For information on the differences between N1570 and the final, published version of C11, see Latest changes in C11 and https://groups.google.com/g/comp.std.c/c/v5hsWOu5vSw

  • 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. 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)

  • C2x work-in-progress - latest working draft as of 7th August 2022 (N3047):
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf

For C++:

  • 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: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: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:2023 (C++23 work-in-progress. Working draft dated March 17 2022): https://open-std.org/JTC1/SC22/WG21/docs/papers/2022/n4910.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; 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. By doing so, one of this post's editors was able to find the C11 and C++11 standards at reasonable prices. 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.


The site https://wg21.link/ provides short-URL links to the C++ current working draft and draft standards, and committee papers:

  • https://wg21.link/std11 - C++11
  • https://wg21.link/std14 - C++14
  • https://wg21.link/std17 - C++17
  • https://wg21.link/std20 - C++20
  • https://wg21.link/std - current working draft (as of May 2022 still points to the 2021 version)

The current draft of the standard is maintained as LaTeX sources on Github. These sources can be converted to HTML using cxxdraft-htmlgen. The following sites maintain HTML pages so generated:

  • Tim Song - Current working draft - C++11 - C++14 - C++17 - C++20
  • Eelis - Current working draft

Tim Song also maintains generated HTML and PDF versions of the Networking TS and Ranges TS.

POSIX extensions to the C standard

The POSIX standard (IEEE 1003.1) requires a compliant operating system to include a C compiler. 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.)

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.1-2001: The System Interfaces section can be downloaded as a separate document from https://mirror.math.princeton.edu/pub/oldlinux/download/c951.pdf. Section 1.7 states that the relevant version of the C standard is 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". 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.

    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. 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.

    There is a paywalled link to download the first corrigendum at 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

  • There is a draft version of POSIX.1-2008 at http://www.open-std.org/jtc1/sc22/open/n4217.pdf.

    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.

  • 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. 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)". Linux manpages describe it as "technically identical" to POSIX.1-2008 with Technical Corrigenda 1 and 2 applied. This is therefore not a major revision and does not change the value of the _POSIX_C_SOURCE macro.

Where to find C++11 reference paper/digital, and a book reference

Nicolai Josuttis updated his book The C++ Standard Library for C++11 in April 2012. Specifically, it covers the following aspects:

  • Concurrency
  • Fractional arithmetic
  • Clocks and Timers
  • Random numbers and distributions
  • New smart pointers
  • Regular expressions
  • New STL containers, such as arrays, forward lists, and unordered containers
  • New STL algorithms
  • Tuples
  • Type traits and type utilities

It also covers the following new C++11 language elements:

  • Lambdas
  • Range-based for loops
  • Move semantics
  • Variadic templates.

Josuttis also gave an interview about his new book.

How to track newer C++ std documents of given topic?

For the newer proposals (ones that start with the letter P) you can use wg21.link redirect service to obtain the latest document:

wg21.link - WG21 redirect service.

Usage:

wg21.link/nXXXX
wg21.link/pXXXXrX
Get paper.

wg21.link/pXXXX
Get latest public revision of paper.

wg21.link/std
wg21.link/std{11,14,17}
Get working draft.

wg21.link/cwgXXX
wg21.link/ewgXXX
wg21.link/lwgXXX
wg21.link/lewgXXX
wg21.link/fsXXX
wg21.link/editXXX
Get issue.

wg21.link/pXXXX/issue
Get issue for paper.

wg21.link/*wgXXX/paper
Get paper for issue.

wg21.link/index.json
wg21.link/index.ndjson
wg21.link/index.txt
wg21.link/specref.json
Get everything.

wg21.link/
Get usage.

wg21.link/<something else>
Get 404.

If you're Slackbot or Twitterbot:
Get OpenGraph metadata instead.

For example for P0476: Bit-casting object representations if we use wg21.link/P0476 we obtain the latest version which is P0476R2.

In my answer to How does the standards committee indicate the status of a paper under consideration? I go into more details of the WG21 site and what documents you can find there.

Use the everything link for Pre P proposals

If we use the wg21 redirect service Get Everything link we can do a text search for the paper title. So for your example Improvements to std::future<T> and Related APIs we can see the last document is N3857:

"N3857": {

"type": "paper",

"title": "Improvements to std::future and Related APIs",

"subgroup": "Concurrency",

"author": "N. Gustafsson, A. Laksberg, H. Sutter, S. Mithani",

"long_link": "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3857.pdf",

"link": "https://wg21.link/n3857",

"source": "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/",

"date": "2014-01-16"

},

Where can I find the C specification?

You're looking for a C standard. Since the standards bodies fund themselves through the sale of standard publications, you can't get the final version. However, there are many copies of C draft standards out there which are good enough for your purposes.

https://www.google.com/search?q=c+draft+standard+pdf

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf

How to detect which C++11 features are used in my source code

As said before, this is static analysis of source code.
With some simple grep, you can be able to identify some C++11 features such as C++11 STL containers, noexcept, use of move semantic, auto ...

For a more subtle analysis, I would recommend the use of clang API to parse the code source.
You can easily check whether a function (and know which one!) is deleted, constexpr... With that, you can do what ever you want (create a report, write the CMake file...)

In all case, I don't think there is a all-in-one tool and you will have to write some parts yourself.

Where in the C++11 standard is std::fmodf stated?

Where in the C++11 standard is std::fmodf stated?

It wasn't mentioned directly (although it probably should have been mentioned either in the list of functions, or explicitly omitted). The change that causes std::fmodf to exist is here (quote from draft N3337):

The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

  • ...
  • ISO/IEC 9899:1999, Programming languages — C
  • ...

Through the following rule:

[c.math]

The contents of these headers are the same as the Standard C library headers <math.h> and <stdlib.h> respectively, with the following changes: ...

C99 added fmodf. It was inherited to C++ when C++11 started referring to the standard library of C99 instead of C89.

Note, the "following changes" do not list omission of fmodf.



Why isn't fmodf listed in the list of functions (26.8/3 and 26.8/9)? It was added to the list in the C++17 standard.

This appears to have been an editorial mistake. It seems to have been fixed in C++17 by P0175 which proposes:

In this editorial paper we propose to add to the working draft the complete synopses of the C library headers that are included in C++ by reference to the C standard (see Table 15). These synopses will replace the various tables captioned “Header synopsis”.


Sidenote: std::fmodf is fairly useless in C++, since you can simply use std::fmod instead, and that has been around since C++98.

Where do you track the developments of new c++ standards?

C++ has been updated much here lately. I would recommend wikipedia's article on C++ though. It usually is kept up to date (not that a lot's changed). I guess the closest thing to a specification that I've found is Bjarne Stroustrup's book (the creator of the C++ language) on, what else, the C++ language.

Is open-std.org the official website for C++11 standard documentation?

The officially finalized standard isn't free. You can buy it from your national standardization organization. You can probably buy it for relatively few dollars from ANSI.

The open-std web site is used for the internal standardization work. The papers published there can be very close or even identical to the standard document but they are not the official ISO documents.

There is isocpp as an entry point to the group standardizing C++. This page doesn't provide the official C++ standard either; the official source for any ISO standard is the national standardization organization. However, when choosing a suitable version of the working paper from open-std.org you'll get something fairly close. For example, the document you pointed to is sufficiently close to the C++11 standard to be useful for most uses.



Related Topics



Leave a reply



Submit