What is “ANSI C++”?

会有一股神秘感。 提交于 2020-01-01 08:37:30

问题


I've had someone tell me that C++98 was written under ANSI before being formally standardised as ISO/IEC 14882:1998.

I know that ANSI was involved with C, but I can't seem to find much in the way of proof that the phrase "ANSI C++" is terribly accurate.

  • Is "ANSI C++" a good description for C++98?
  • Is "ANSI C++" a good description for subsequent versions of the C++ standard?

回答1:


Initially, in '89, the standardization of C++ was handled by ANSI X3J16. Starting in '91 ISO WG21 joined in. You may want to read BS's A History of C++:1979-1991. IMO, "ANSI C++" is just a leftover name; the language is "ISO C++" even though ANSI is indirectly involved in the standardization.




回答2:


This gotw page describes the relationship of ANSI and ISO as far as C++ is concerned, briefly:

The official names of the ISO and U.S. committees are:

ISO/IEC JTC1/SC22/WG21 - C++ (ISO C++ committee)

INCITS PL22.16 - C++ (the U.S. C++ committee, often called the "ANSI C++ committee" -- although more accurately INCITS is a separate organization that is not a part of ANSI but is accredited by ANSI to develop U.S. standards) (previously called X3J16 and J16)

These two groups together are often referred to in the singular as "the C++ committee" because they meet and do their work together. The meetings are always in the same room at the same time

It sounds like the ISO standard developed by this committee automatically becomes the U.S. standard, although I am sure people who actually work in those committees can explain better.




回答3:


Sort of, but not really. There isn't, and never has been a separate ANSI standard for C++.

The current standard, however, is actually INCITS/ISO/IEC 14882-2003. As of 2003, INCITS became a separate ANSI-accredited organization. The name INCITS wasn't new, but previously, it had been part of ANSI. In 2003, it was "spun off" as a separate (but still ANSI-accredited) organization. The current (2003) standard therefore shows up as an INCITS/ISO/IEC standard, and I believe the upcoming (2011) standard will also.




回答4:


C++98 was developed by an international committee, part of the International Organization for Standardization (ISO). ANSI, and other national standards bodies, are members of this committee. The international standard has been adopted by ANSI as the US national standard, and likewise by many other national standards bodies.

Earlier versions were developed commercially in the US by AT&T; I'm not sure whether or not ANSI was involved in intermediate versions (EDIT: but Erik's answer suggests that it was, briefly).

Is "ANSI C++" a good description for C++98?

I would call it "Standard C++", or "C++98", or just "C++" if it's clear that I'm talking about the current standard. While technically accurate, "ANSI C++" might confuse people who don't realise that it means the same thing, particularly people from other countries who might not know what ANSI is. I would probably get odd looks if I called it "British Standard C++", an equally accurate description.

Is "ANSI C++" a good description for subsequent versions of the C++ standard?

Same answer. The C++ standards are developed by ISO, and adopted by ANSI and other bodies.




回答5:


AFAIK when they say "ANSI C++", they really mean "no compiler-specific extensions".




回答6:


The ISO working party creates the standard. C++98 had a lot of work done on standardisation in America (because that's where C++ was created, and where its creators lived) before the standardisation was taken under the auspices of the ISO committee (who were the same people). The final ISO Standard was then adopted by ANSI, and other national standards authorities.

I've always referred to Standard C++ as "Standard C++".



来源:https://stackoverflow.com/questions/5863051/what-is-ansi-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!