From -3650406588369258965 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,307cbe6f0ea2ccd3 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2003-06-11 12:19:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull From: llewelly.at@xmission.dot.com (LLeweLLyn) Newsgroups: comp.std.c++ Subject: Re: Recommendation to the Standards Committee Date: Wed, 11 Jun 2003 19:19:40 +0000 (UTC) Organization: The Illusory Sorting Algorithm Lines: 34 Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: References: <_ULEa.10852$KF1.271850@amstwist00> <3EE50908.9060202@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: mail2news.demon.co.uk 1055359180 28682 10.0.0.1 (11 Jun 2003 19:19:40 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 11 Jun 2003 19:19:40 +0000 (UTC) X-Received: from mulga.cs.mu.oz.au ([128.250.1.22]) by news.demon.co.uk with esmtp (Exim 4.12) id 19QB8E-0007ST-00 for mail2news@news.news.demon.net; Wed, 11 Jun 2003 19:19:39 +0000 X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU id FAA16827; Thu, 12 Jun 2003 05:19:36 +1000 (EST) X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Path: comp-std-cpp-robomod!not-for-mail X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-Delivered-To: std-c++@ucar.edu X-Newsgroups: comp.std.c++ X-NNTP-Posting-Date: Wed, 11 Jun 2003 04:16:39 +0000 (UTC) X-User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) X-Cancel-Lock: sha1:AaoyPcCCUjGvBhHodj6APfg07sQ= X-Spam-Status: No, hits=-6.9 required=5.0 tests=EMAIL_ATTRIBUTION,MAILTO_TO_REMOVE,NOSPAM_INC, QUOTED_EMAIL_TEXT,REFERENCES,SATISFACTION, SPAM_PHRASE_00_01,USER_AGENT version=2.41 Xref: archiver1.google.com comp.std.c++:19692 m@rtij.nl.removefromhere.invalid (Martijn Lievaart) writes: > On Mon, 09 Jun 2003 23:05:51 +0000, Andrey Tarasevich wrote: > > [ #once ] >> >> Yeah, but it looks like the main point of the method Brian is using is that >> the guarding '#ifndef'/'#endif' is placed _outside_ the header file. In this >> case the preprocessor doesn't even have to search for already included >> files, open them or try parsing them. The '#once' solution doesn't help in >> this case, since '#once' directive is supposed to be specified _inside_ >> header files. From this respect '#once' is not much different from the >> standard "internal '#ifndef'/'#define'/'#endif' approach". But it looks >> like Brian is not satisfied with the latter. Under this circumstances, I >> don't think he will be satisfied with any other "internal" solution. > > I don't think so. The compiler can 'cache' the #once and skip the header > when the #include directive is seen again. > > Hmmmm, as a QoI issue, a compiler /could/ recognize header guards and > treat the as #once.... Hmmmm. > > M4 And in fact some compilers do: gcc.gnu.org/onlinedocs/gcc-3.3/cpp/Once-Only-Headers.html#Once-Only%20Headers --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]