|
Boost : |
Subject: Re: [boost] Towards a Warning free code policy proposal
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-08-27 14:26:31
On Fri, Aug 27, 2010 at 8:26 AM, vicente.botet <vicente.botet_at_[hidden]> wrote:
> Hi all,
>
> Last year there where two long threads about Boost Warning policy. If I'm not wrong nothing was concluded. I think that we can have two warning policies: one respect to the Boost users and one internal for Boost developement.
>
> We can consider that Boost headers can be used by the users as system headers, so no warning is reported for these files. The main advantage I see is that it allows the users to don't mix the warnings comming from Boost and their own warnings.
>
> Next follows a way to disable completly warnings for 3 compilers: Any Boost header file could be surrounded by
>
> #if defined __GNUC__
> #pragma GCC system_header
> #elif defined __SUNPRO_CC
> #pragma disable_warn
> #elif defined _MSC_VER
> #pragma warning(push, 1)
> #endif
>
> and
>
> #if defined __SUNPRO_CC
> #pragma enable_warn
> #elif defined _MSC_VER
> #pragma warning(pop)
> #endif
If we want to do something like that, it should be encapsulated in
#include files:
#include <boost/detail/header_prefix.hpp>
...
#include <boost/detail/header_suffix.hpp>
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk