Boost logo

Boost Users :

Subject: Re: [Boost-users] Why something like #ifndef BOOST_MPI_HPP is always capitalized?
From: Richard Damon (Richard_at_[hidden])
Date: 2008-09-19 15:59:30


On Fri, 19 Sep 2008 14:47:29 -0500, "Peng Yu" <pengyu.ut_at_[hidden]>
wrote:

>Hi,
>
>In most of the C++ header files I've seem, a macro like the following is
>used to guard repetitive inclusion of the file. I'm wondering why it is
>always in upper case. Why not make it the same case as the file name?
>
>What if there are two header files on is in lower case, the other is in
>upper case?
>
>Thanks,
>Peng
>
>#ifndef BOOST_MPI_HPP

Because normal convention is that macro names are placed in upper
case, and other names are not to avoid collisions with names, and to
make visual identification of them clearer.

Richard


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net