Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-02 04:27:50


Stefan Slapeta wrote:
> Jeff Garland wrote:
>
>>In date-time this is easy b/c all these calls are in about 20 lines of code.
>>This solution silences both library and user build -- allowing the user to
>>decide on whether they want the warnings for their own code.
>
> I think this is a nice solution but I'm not sure whether 1.33.1 could be
> reopened for these changes which would affect many header files in boost.

It would be a good idea to have a <boost/warnings/push.hpp> and
<boost/warnings/pop.hpp> that would disable then restore common warnings
that occur in boost. You would then have

#include <boost/warnings/push.hpp>
// ...
#include <boost/warnings/pop.hpp>

in the affected Boost headers. This would then keep all the warning
logic in one place, offer a more elegant solution to the VC8 deprecated
function problem and help users of Boost that enable all warnings and
warnings as errors.

This idea was proposed previously, but there wasn't enough interest in
it. If this seems a reasomable solution, I could look at providing an
implementation of these headers with support for the Microsoft, Borland
and Metrowerks compilers as it can be annoying to do:

#pragma warnings ( push )
#pragma warnings ( disable : nnnn ) // disable some warning
#include <boost-header>
#pragma warnings ( pop )

whenever I want to include a boost header.

- Reece


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk