Boost logo

Boost :

Subject: Re: [boost] [wiki] Warning Guidelines for VC
From: Michael Caisse (boost_at_[hidden])
Date: 2010-12-31 19:12:19

On 12/31/2010 07:40 AM, Paul A. Bristow wrote:
> Well it's really good to get news from the 'horse's mouth' - even if the
> news is bad!
> So it would seem that there is no reliable way to determine if any code
> (including STL) is C++ Standard Conforming,
> apart from trying to compile it on a non-Microsoft Standard Conforming
> Compiler in strict mode?

We might have different philosophies, but I would not have trusted any
single compiler for that information. And while we all try our best for
standard conforming code, in the end it is various compiler conforming
code that must be written.

> So while many, if not most, Boost Users will deplore this on principle,
> I fear we must be pragmatic and accept this, however unhappily.
> Fortunately, our extensive testing schedule using all the many compilers
> (using their 'strict' mode where possible) will reveal un-portability before
> any final Boost release 'hits the streets'.

I often think of the Boost community as people who need to target
multiple compilers/platforms. That might be wrong or too narrow. As far
as Boost libraries are concerned, I think this is a non-issue. The code
has to work with various compilers either at their least common
conforming level or at various compiler specific alternatives. I don't
see how the flag actually could help unless you were developing only on
MSVC and then trying to port to other platforms.

> So unless there are other views, I propose to change the 'Dealing with
> warnings guidelines' to warn that the option is 'definitely dodgy'.
> (mainly by a link to this helpful post).
> Although /Za might help a little during development, loading and testing on
> the trunk remains the definitive test of portability.

The more I think about it the more I would caution to not use the flag
at all. The question that came up on IRC was with ASIO. The user
reported that the resulting program "didn't work" with the flag and
worked fine without it. If the MS Standard Library isn't even tested
with the flag it seems like something I wouldn't use. I don't see the
value it adds. I'm also not strongly attached to that as a published
opinion because it is my secondary compiler at best.

Thank you Paul for maintaining this wiki page and working through all
the various issues that come up.

Best regards -

Michael Caisse
Object Modeling Designs

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