|
Boost : |
Subject: Re: [boost] [#pragma once]
From: Niels Dekker - address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2009-04-10 12:17:20
Eugene Wee wrote:
> Sutter and Alexandrescu say the same in C++ Coding Standards Item #24,
> but with admonishment to keep all other code and comments in between
> to cater for less intelligent detection of include guards (whereas
> many header files in Boost have comments right at the top).
Personally I'd be in favor of having the include guard starting right at
the top, instead of starting with a few lines of comment. Although I
don't know if doing so would significantly improve compilation times.
Does it?
Steven Watanabe wrote:
> IMO, there is absolutely no reason to /rely/ on non-standard
> features even if /all/ compilers supported it in this case.
BTW, #pragma once has been discussed extensively at comp.std.c++,
December 2007: "#pragma once in ISO standard yet?"
http://groups.google.com/group/comp.std.c++/browse_thread/thread/c527240043c8df92
Apparently it's hard to implement such a #pragma in a reliable way.
There's also a related ticket: https://svn.boost.org/trac/boost/ticket/1532
HTH, Niels
-- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk