Boost logo

Boost :

Subject: Re: [boost] Help needed in fixing warnings
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2009-11-10 13:43:32

On Tue, Nov 10, 2009 at 7:33 PM, Emil Dotchevski
<emildotchevski_at_[hidden]> wrote:
> On Tue, Nov 10, 2009 at 1:58 AM, John Maddock <john_at_[hidden]> wrote:
>> Nod.  I don't think anyone is suggesting that all of boost be warning free
>> with all possible compilers, that just wouldn't be possible IMO.
> It is possible. For me, the bottom line from this discussion is that
> #pragma warning and #pragma GCC system_header are my best friends. :)

Sorry for getting in this late, but with gcc, isn't it better to just
include boost code with --isystem instead of -I?

I usually never see warnings from boost because I use the boost
version that comes with the linux distro I use, which puts all headers
in /usr/include. Gcc treats all headers there as system headers and
doesn't show any warning.

If I have to use of a boost installation in a non-standard include
path, I make sure to use -isystem if I do not want to see warning.

IMHO, with gcc at least, boost should just document that the
preferred way to include boost headers, if not installed by default,
is through -isystem, which has the double advantage of not polluting
boost headers with compiler specific workarounds and still giving the
user full control of whether he wants to see warnings or not.

just my 2 eurocents,


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