28

I'm pretty sure I read on an authoritative source somewhere (I believe it was on the WG21 pages) that C++03 was not a technical corrigendum of C++98 but that it was a new release of the C++ Standard.

But nontheless I see only -std=c++98 switch in GCC and others compilers and Alf P Steinbach made a few comments hinting at that it may indeed be a TC of C++98.

So when I'm writing about "C++03", does it suffice mentioning C++98? As a related question, is it even wrong to use the term "C++03"? Because I think if it is really C++98 TC1, then it seems to me it cannot be called C++03. Just as I've never seen someone write C07 for the C99TC3 release.

Community
  • 1
  • 1
Johannes Schaub - litb
  • 496,577
  • 130
  • 894
  • 1,212

2 Answers2

12

Yes and no.

C++03 (ISO C++14882:2003) is a standard in its own right, and it is also "just" TC1 because it is only C++98 amended with a set of corrections.

You can say that C++03 is what C++98 was intended to be, the actual wording of C++98 revised to make it say what it was meant to say.

In the committee's own words:

“The first edition of ISO/IEC 14882 was published in 1998. A technical corrigendum was approved in 2003, . and the standard was published again as the 2003 edition.”

The extraneous period in there is just quoted literally.

In the words of Wikipedia (which is not an authority, but should be fixed if it’s wrong):

“For some years after the official release of the standard, the committee processed defect reports, and published a corrected version of the C++ standard, ISO/IEC 14882:2003, in 2003.”

One might argue, however, that value initialization was a new thing and not just a correction. And one might argue that the Technical Corrigendum itself consisted only of the corrections, while the standard amended with those corrections is a different thing, a new standard. Both of these points view make sense contextually, as I see it, although not as absolute context-independent statements.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
Cheers and hth. - Alf
  • 142,714
  • 15
  • 209
  • 331
  • So the committee says that *they* approved it as TC but the iso made a non-TC new standard out of it? – Johannes Schaub - litb Nov 27 '11 at 16:58
  • @Johannes: no, they do not say "non-TC". C++03 is, in the words of the back cover of the dead tree version, "the complete, current International C++ Standard incorporating Technical Corrigendum 1 / This is technically BS ISO/IEC 14882:2003 (Second Edition) as approved by all national standards bodies (such as ANSI). It is the ONLY available bound version of the standard." I'm not sure what the BS in there means, though. – Cheers and hth. - Alf Nov 27 '11 at 17:19
  • @AlfP.Steinbach: British Standard. The BSi where the only standards body to publish a bound dead tree edition AFAIK. – CB Bailey Nov 27 '11 at 20:54
  • just in case someone tries to find the qoute from wikipedia and cannot find it: Probably in the course of updating the wikipedia entry to include newer standards the senctence quoted here changed, it now says: "In 2003, it [the comitee] published a new version of the C++ standard called ISO/IEC 14882:2003, which fixed problems identified in C++98." which is still more or less saying the same – 463035818_is_not_an_ai Feb 07 '19 at 10:52
  • @Cheersandhth.-Alf What do you think "This is technically BS" means? – S.S. Anne Nov 12 '19 at 17:42
1

It is a whole new Standard. I believe that it began as just a TC, which is why the confusion occurs, and it certainly is effectively just a bugfix release. However, there were changes and it is worth knowing whether you're talking about 98 or 03.

Puppy
  • 144,682
  • 38
  • 256
  • 465
  • 2
    "However, there were changes and it is worth knowing whether you're talking about 98 or 03.": such as? – akappa Nov 27 '11 at 13:34
  • 1
    @akappa: `std::vector` only required it's elements be contiguous starting in 03, for example. I disagree it matters much though. Anyone who cares about what the behavior of C++98 was will already be in a position to know they ought to specify that. Someone just asking about "C++" is probably looking for a practical answer, and so wants to know the behavior of the current standard, and what their compiler will support. Since we are now on C++11, C++98 is effectively irrelevant for such questions. – GManNickG Nov 27 '11 at 23:23
  • 2
    @GManNickG the question is explicitly asking about C++03 vs C++98, not just "C++". The distinction is far from irrelevant - legacy software yadda yadda. – ACK_stoverflow May 09 '14 at 13:31