Article View: comp.std.c++
Article #3323Re: #ifdef XXXX
From: Jonathan de Boyne Pollard
Date: Mon, 12 Feb 1996 20:54
Date: Mon, 12 Feb 1996 20:54
22 lines
1890 bytes
1890 bytes
John R. Williams (johnw@jove.acs.unt.edu) wrote:
| I think it would be even better to make "#pragma once" (a common C
| extension, AFAIK) into a standardized directive ("#once"?). This would
| probably save an average of 30 characters per header (the most annoying
| ones in the whole language(s), IMO).
At least one C++ compiler vendor (MetaWare) implements #c_include, which
has the same semantics as #include, except that it is ignored the second
and subsequent times that it is encountered for the same file.
| Also something I have often wished for was something like #warning which
| would cause the compiler to emit a warning.
Coincidentally, the same compiler vendor provides #print. It's quite
useful, actually.
As I've said before, many features that people so often find desirable are
actually already implemented by compiler vendors. Vote with your wallets.
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID:
<4fo5ih$som@silver.jba.co.uk>Path:
arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austernReferences:
<1996Feb1.092058.4745@iiasa.ac.at> <4fe1jt$scn@hermes.acs.unt.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern From: JdeBP@jba.co.uk (Jonathan de Boyne Pollard) Newsgroups: comp.std.c++ Subject: Re: #ifdef XXXX Date: 12 Feb 1996 12:54:00 PST Organization: JBA Software Products, Studley, England. Approved: austern@isolde.mti.sgi.com Message-ID: <4fo5ih$som@silver.jba.co.uk> References: <1996Feb1.092058.4745@iiasa.ac.at> <4fe1jt$scn@hermes.acs.unt.edu> Reply-To: JdeBP@donor2.demon.co.uk NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 12 Feb 1996 19:48:33 -0000 X-Newsreader: TIN [version 1.2 PL2] X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMR+o9ky4NqrwXLNJAQGHoQH/WnR7b8P0YxmNNo9THpvdJATcy/vYRzjh tKHP3uJPTggIZxKHOn5pXxakoaL+UQJGoKvK56uQBXZHcFLkYFBrCQ== =RGbw Originator: austern@isolde.mti.sgi.com