Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-10-30 14:29:58


--- In boost_at_y..., dmoore_at_a... wrote:
> > Just curious if anyone else has
> > any insight into how we can work around this.
> >
> > Bill Kempf
>
>
> In an email exchange with P.J. Plaugher a couple of years back on
his
> Dinkumware distribution (the one used in MSVC 5 and 6), he told me
> that many of his headers re-enable warnings at the bottom rather
than
> using a "push/pop" method for temporarily disabling things to suit
a
> particular header.
>
> The net effect is that at the bottom of <map> or <list>, there is a
> hardwired #pragma warning (3:4786) which resets 4786's to level 3,
no
> matter what you try to do.

I don't believe you have the facts correct here. My copy of <map>,
for instance, which is the standard file distributed with MSVC++ 6
has no such pragma. It wouldn't make sense for it to have such a
pragma, either, since <map> also never disables the warning to begin
with.

> He considered this to be a bug, he fixed this in his standalone C++
> library distribution, but told me that Microsoft declined to fix
this
> in the version which ships with 6.0.
>
> My personal workaround has been to do the following:
>
>
> #pragma warning(disable:4786)
>
> #include <map>
> #include <string>
> // etc.
>
> #pragma warning(disable:4786)

Again, this simply doesn't work in several cases in Boost.Threads.
 
Bill Kempf


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