Boost logo

Boost :

Subject: Re: [boost] [wiki] Warning Guidelines for VC
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2010-12-31 09:11:49

[Michael Caisse]
> STL's (Stephan Lavavej's) advice on the subject was to *not* use /Za because
> it has "an extremely nasty bug".

[Beman Dawes]
> Does anyone know if this "nasty bug" is fixed in the VC++ 2010 SP1 beta?

When I encountered that bug (valid code like vector<unique_ptr<T>> triggers compiler errors under /Za; the problem is that /Za performs an elided-copy-constructor accessibility check during move construction when no copy constructor is being called even theoretically), I asked for a fix, but unfortunately the resolution was "won't fix forever". I can confirm that it will not be fixed in VC10 SP1 RTW, and that there are currently no plans to fix it in VC11.

As a result, during VC10's development we stopped testing our C++ Standard Library implementation under /Za, and I no longer consider it to be a supported switch. (We support almost all switches, including the headache-inducing ones like /Gr and /Gz, but we have to draw the line when valid code is broken.)

I also asked for /Za to be removed from VC11, but that won't happen either. (However, I was told that /Wp64, which was deprecated in VC9 and VC10, will be removed from VC11. I don't think that's happened yet so I'll have to ping a compiler dev about it. /Wp64 has always been broken - it suffers from false positives and false negatives and interacts extremely badly with templates - and it has been completely superseded by the existence of x64-targeting compilers.)

My comments at and below provide a guaranteed-to-be-exhaustive list of the STL bugs fixed in VC10 SP1 Beta/RTW (there are 3 in the Beta, and no more are planned for RTW; if that changes I'll post about it), and a partial list of VC fixes in the SP1 Beta (I was able to dig up most of the Connect bugs that were fixed).

Stephan T. Lavavej
Visual C++ Libraries Developer

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