
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.
#ifndef BOOST_FUNCTION_HPP #define BOOST_FUNCTION_HPP ... #endif // BOOST_FUNCTION_HPP
Is it allowed to have an #endif followed by comment, on the very same line? Kind regards, -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center