Article View: comp.std.c++
Article #2659Re: New STD header format (no extension), How
From: Steve Clamage
Date: Sun, 19 Nov 1995 19:19
Date: Sun, 19 Nov 1995 19:19
38 lines
2141 bytes
2141 bytes
Michael Cook <mcook@cognex.com> writes: >>>>>> "SC" == Steve Clamage <clamage@Eng.Sun.COM> writes: > SC> if a compiler previous used <iostream.hxx>, I would expect it to continue > SC> to accept <iostream.hxx>, and pick up the same header file as <iostream>. >Wasn't there some rule about `#include <foo>' being treated like `#include ><foo.hxx>' followed by a bunch of `using' declarations? No. You are probably thinking of the two forms of the headers which are inherited from Standard C. For example, <stdlib.h> and <cstdlib> <stdio.h> and <cstdio> <string.h> and <cstring> ... etc ... The <cxxx> form corresponding to <xxx.h> puts all the declarations in the "std" namespace. The <xxx.h> form, the form used in C, has those same declarations in "std" followed by using-declarations for each item. Thus, when you include <stdio.h>, the effect on the program is the same as in a C program. If instead you include <cstdio>, you can select the declarations you want by qualifying them explicitly or by employing individual using-declarations, or you could get all of them via a "using namespace std" directive. The standard headers specific to C++ have only one form defined in the standard, such as <new>, <iostream>, and so on. An implementation can supply whatever additional headers it likes, with whatever semantics it likes. -- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<48nsl6$76a@engnews1.eng.sun.com>Path:
arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!MattReferences:
<48g1lj$s2p@stellar.comnet.com> <48ihah$mgf@engnews1.eng.sun.com> <r4hh01snda.fsf@erawan.cognex.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: New STD header format (no extension), How Date: 19 Nov 1995 19:19:07 GMT Organization: Sun Microsystems Inc., Mountain View, CA Approved: Matt@Austern Message-ID: <48nsl6$76a@engnews1.eng.sun.com> References: <48g1lj$s2p@stellar.comnet.com> <48ihah$mgf@engnews1.eng.sun.com> <r4hh01snda.fsf@erawan.cognex.com> NNTP-Posting-Host: austern.hip.berkeley.edu