Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which PDF of the C++ ISO standard should I read? [duplicate]

Tags:

c++

standards

iso

Sometimes, I want to search answers from the C++ standard by myself. Reading standards might help me get an overview of the language principle proposed.

By searching the internet, I was confused by flooding C++ forums and helper websites. They provide all kinds of PDF files for reading.

I don't know which PDF file and/or which version should I adopt.

I found several websites:

  • JTC1/SC22/WG21
  • Standing Documents

I wonder whether there is a single site where the standard is posted. Which version should I refer to when solving problems? Some says C++98, while other say C++11, and even the latest working drafts. (many drafts confusing me).


EDIT
I found a useful information from The Standard, which writes:

Except only for the final standards/reports, all C++ committee documents are freely publicly available, including all working drafts, many of which closely approximate the published standard. The January 2012 working draft contains the C++11 standard plus minor editorial changes.

The January 2012 working draft is N3337.
Hope this help you guys.


EDIT
From Wiki C++11, it writes:

The working draft most similar to the published C++11 standard is N3337, dated 12 January 2012; it has only editorial corrections from the C++11 standard.

like image 353
Zachary Avatar asked Jun 21 '13 02:06

Zachary


People also ask

What is ISO PDF?

ISO 32000-2, Document management – Portable document format – Part 2: PDF 2.0, specifies a digital form for representing electronic documents, enabling users to exchange and view electronic documents independent of the environment in which they were created, viewed or printed.

Is C ++ 20 released?

C++20 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++20 replaced the prior version of the C++ standard, called C++17. The standard was technically finalized by WG21 at the meeting in Prague in February 2020, approved on 4 September 2020, and published in December 2020.

How to write an ISO number?

Numbers should be printed in upright (roman) type. ISO 31-0 (after Amendment 2) specifies that "the decimal sign is either the comma on the line or the point on the line". This follows resolution 10 of the 22nd CGPM, 2003.

What is C++ standard?

In the C++ programming language, the C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Standard itself.


2 Answers

2018 Update: The C++ standard is maintained on GitHub. You can find an archive of old working drafts here that goes back a few years.


The official C++11 standard INCITS/ISO/IEC 14882:2011 is available at ansi.org for $30. You can Google older standards by searching for e.g. 14882:2003 and looking for PDFs. I'm not sure if it's "legal" to download them, so be sure to feel bad about it if you do so.

Before a standard is published, the committee maintains a Working Draft of the standard document with all the revisions as they introduce them. That Working Draft is eventually voted to become a standard, after which only minor editorial changes are made before it is published as a standard.

The working drafts - and quite a few other papers - are released as a numbered series of documents by the committee and are publicly available except for the final approved draft of the standard. ISO rules keep the last revision "secret" so that people will pay for the standard and that money can be used to fund the organizational work the actual ISO does.

People who don't want to pay for the standard use the final public copy of the working draft as a reference, as it is generally identical to the standard document modulo the minor editorial changes I mentioned earlier. For C++11, that last draft is N3242 - Working Draft, Standard for Programming Language C++. The first working draft after C++11 N3337 may more correctly reflect the final standard (I'm too lazy to compare).

The current Working Draft for C++1y is N3690 - Programming Language, C++. If you're really hardcore, you can track the editor's repo of the current draft at Github.

like image 105
Casey Avatar answered Sep 28 '22 02:09

Casey


The official ISO standard for C++11 is ISO/IEC 14882:2011, and official ISO standard for C++03 is ISO/IEC 14882:2003. You usually need to pay to get a copy of these (and to the best of my knowledge that's the only legal way to do so), and these are the official documents.

C++98 is an older version of the language that was superseded in 2003 with C++03, which was mostly minor bug fixes and adjustments to the document. C++11 is the newest C++ standard and was released in 2011. Compiler support is still in-progress. The drafts that you're referring to are draft versions of the standards that are periodically released, which may differ from the final published version. Working papers are mostly proposals for the documents that are considered by the ISO group, but which are not official.

Hope this helps!

like image 21
templatetypedef Avatar answered Sep 28 '22 01:09

templatetypedef