23

In C there's C89, C99, and C11; what about C++? Is there any upgrade since it came out?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
tem
  • 357
  • 1
  • 3
  • 8
  • Actually, C has more versions than that. There's ISO C90 for instance, which is very, very close to ANSI C89, and there's "C94" - not a full standard, but a Normative Addendum. – MSalters Oct 15 '10 at 08:28
  • @MSalters: out of interest, what are the differences between C89 and C90? I've never had them straight from the publisher to compare. I thought it was basically just a new introduction and maybe page renumbering - are there any technical differences? – Steve Jessop Oct 15 '10 at 10:36
  • @Steve Jessop: I'm not aware of technical differences either; it's just a matter of being careful if you quote chapter&verse because of the renumbering. – MSalters Oct 15 '10 at 14:34
  • The differences between ANSI and ISO C are all based on non-normative content and section numbering, iirc. Also, there are various Technical Corrigenda for C99. – Johannes Schaub - litb Oct 15 '10 at 17:36
  • See also this question: http://stackoverflow.com/questions/81656/where-do-i-find-the-current-c-or-c-standard-documents – sbi Dec 21 '10 at 20:57
  • 1
    C89 was issued by ANSI. C90 was issued by ISO, and describes exactly the same language. Under ISO rules, they added some front matter and renumbered the sections. C89 sections 3 and 4 (language and library) are C90 sections 6 and 7, respectively. ISO C99 uses the same top-level section numbering as ISO C90. ANSI officially adopted the ISO C90 standard after it was issued; ANSI C89 became obsolete at that point. And ANSI adopted the ISO C99 standard as well, which officially made C90 obsolete. – Keith Thompson Dec 10 '11 at 21:59
  • For C there's also C1x now (work in progress). – Kos Dec 20 '11 at 12:20

1 Answers1

27
  • C++98 (ISO/IEC 14882:1998) is the first edition.

  • C++03 (ISO/IEC 14882:2003) is the second edition and often considered a bugfix, but it has many changes.

  • C++11 is the third edition.

  • C++14 is the fourth edition.

  • C++17 is the latest edition (as of 2017).

You can download PDFs of the standards and drafts.

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Prasoon Saurav
  • 91,295
  • 49
  • 239
  • 345
  • 3
    C++03 is almost the same as C++98 though, it isn't sort of a new standard, it's rather a service pack of the previous one :) – Armen Tsirunyan Oct 15 '10 at 07:59
  • 3
    @Armen : Yeah most of the things in C++03 are similar to C++98. However there are a few differences between C++03 and 98, for example: value initialization (in C++03). – Prasoon Saurav Oct 15 '10 at 08:04
  • Am I right to classify the differences of each standars: 1. more libs 2. some change of syntax that's compatible with earlier versions. Can you confirm or deny this? – tem Oct 15 '10 at 08:05
  • @tem : After C++98 was released the committee processed the DRs(Defect Reports [submitted by experts]) and published a corrected version of the C++ Standard i.e C++03. – Prasoon Saurav Oct 15 '10 at 08:15
  • 1
    In case you want to add the links to the answer: [C++03](http://openassist.googlecode.com/files/C%2B%2B%20Standard%20-%20ANSI%20ISO%20IEC%2014882%202003.pdf), [C++0x FCD](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3092.pdf) – David Rodríguez - dribeas Oct 15 '10 at 08:15
  • @David : n3126 is the latest AFAIK. Thanks for the links BTW `:)` – Prasoon Saurav Oct 15 '10 at 08:17
  • 4
    @tem : Yeah!! [This table lists C+ 0x features and their support in popular compilers.](http://wiki.apache.org/stdcxx/C++0xCompilerSupport) – Prasoon Saurav Oct 15 '10 at 08:21
  • 1
    If you include C++03 in the C++ line (which is just a Technical Corrigendum) you have to include C07, C05 besides C99 in the C line (and various others I don't know about). – Johannes Schaub - litb Oct 15 '10 at 17:40
  • @David: I'm pretty sure that copy of C++03 this now links to is actually an illegal one. – sbi Dec 21 '10 at 20:07
  • Prasoon: I'd appreciate if you could make it clear that C++03 is a "bugfix" of C++98, and not a new version. (Well, and a mentioning of the fact that ISO allows a fully new version of any standard only ten years after the publishing of the previous one might be helpful, too.) – sbi Dec 21 '10 at 20:09
  • @sbi [[citation needed]]... The rule is that within FIVE years of the publication of the standard, only DRs should be considered – SoapBox Dec 21 '10 at 20:20
  • @SoapBox: If you're trying to tell me that ISO permits a new version of a standard after 5 years, then I believe you're wrong. (That believe is founded on hearsay, although it was members of the committee who told me that.) – sbi Dec 21 '10 at 20:26
  • @SoapBox: [[citation needed]] yourself. ;) Also technically, C++0x shouldn't be on the list, as it's not a standard yet. – jalf Dec 21 '10 at 21:52
  • @sbi I heard from (other) members of the committee that the 10 year thing was more of a misunderstanding, and that actually there is something in the rules about waiting a *maximum* of 10 years. @jalf I admit I can't come up with an authoritative source, but there's mention on here: http://conferences.embarcadero.com/article/32169 (first sentence of the introduction). – SoapBox Dec 21 '10 at 22:15
  • @sbi: In fact finding that link surprised me. It's been long since I bought my copy of the standard, and at that time the downloaded document contained a watermark identifying that the document is licensed to the individual. Then I thought that they might have made it public for some reason (C++0x being close to completion?) At any rate, I found the link here in SO some time ago... maybe it should be brought to the attention of the admins? – David Rodríguez - dribeas Dec 22 '10 at 00:37
  • @David: I have been trying to stomp on that link here on SO left and right, but obviously it's too viral. `:)` Anyway, ISO sells its standards, so I guess any free copy of a final version (not drafts) you find are likely illegal. – sbi Dec 22 '10 at 08:57
  • @SoapBox: All I have about this 10 years rule is sayings from committee members, too, but that was 5-10 many years ago, so yours might be newer information. – sbi Dec 22 '10 at 08:58
  • @jalf: One could argue that a draft is a version of the standard, albeit a preliminary. `:)` – sbi Dec 22 '10 at 08:59
  • But then there are probably hundreds of versions of the C++ standard. ;) Pretty much every committee meeting produces a new one. – jalf Dec 22 '10 at 09:17
  • @sbi: C++03 is an independent edition of the standard; "second edition" is listed prominently on the front page. There are [303 pages of changes](http://www.acceleratedcpp.com/authors/koenig/c++std/revisions.pdf), so it may differ more than you believe. – Fred Nurk Feb 03 '11 at 13:16