Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-02-23 11:30:44


John Maddock ha escrito:

> Joaquín Mª López Muñoz wrote:
> >>> Would it be an idea to suppress these with some #pragma's if
> >>> they've been investigated and found harmless?
> >>
> >> It can be a good idea, but I need to make sure that #pragma
> >> warning(push) and #pragma warning(pop) can be used here in such a
> >> manner as to not suppress this otherwise useful warning in user
> >> code. Would you volunteer to try some tests in your environment (I
> >> don't have VC7.1 or 8.0) before commiting such a change?
>
> How about the patch below then - turns off the warnings only for your code.
> Note that the suppression of the std::equal warning will suppress the
> warning for any further uses of that template instance as well (since a
> template is instantiated only once).

Oh, you already did the job! Thank you very much. I applied your
C4312/C4311 patch, I'd be grateful if you can double check that
eveything's OK now. As for the other C4996 patch, I decided *not* to
use it because:

1. I'd have to apply it at numerous other locations where std::equal is used
(even though as you say one pragma serves all uses, it might be the case
that boost/multi_index/ordered_index.hpp is not included in a particular
program.)

2. This is a manifestation of the infamous C++ "safe mode". The position of
boost.org wrt to this rather irritating feature is to explicitly *not* support
it and urge the user to avoid it by defining
_SCL_SECURE_NO_DEPRECATE, as exposed in the "Supported
Compilers" section of http://boost.org

Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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