Boost logo

Boost :

Subject: Re: [boost] [function] function.hpp lacks include guard
From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2008-10-21 12:33:45

Okko Willeboordse wrote:
> My co-worker Bob Praster found, using PC-Lint 9.0, that
> function.hpp doesn't have an include guard like;

Mathias Gaunard wrote:
> That's most likely because it doesn't need one, since it's
> only including other headers.

If so, it's probably just a matter of taste. Personally I always add
those include guards to my headers, even when they're not strictly
needed. Once in a while I might have to look into the preprocessor
output, because of some buggy macro call of mine. In that case, I
appreciate having each header included only once, to reduce the amount
of noise in the preprocessor output file.

> ...

Is it allowed to have an #endif followed by comment, on the very same

Kind regards,

Niels Dekker
Scientific programmer at LKEB, Leiden University Medical Center 

Boost list run by bdawes at, gregod at, cpdaniel at, john at