Boost logo

Boost :

From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2007-10-15 07:59:47


Gennadiy Rozental wrote:
> I am building trunk version of Boost.Test with msvc 8.0 and
> see following warning:
> ..\..\..\boost/utility/value_init.hpp(73) : warning C4345:
> behavior change: an object of POD type constructed with
> an initializer of the form () will be default-initialized

I guess the warning is caused by an MSVC-specific workaround that I
committed to trunk/boost/utility/value_init.hpp, September 7, [39157].
My apologizes!

The MSVC warning is about the following line of code:
  new (&x) T();

This line of code looks perfectly fine to me! The warning just tells us
that when T is a POD struct, the newly created object will be initialized.
As it should! Note that MSVC 7.1 produces the very same warning, so it
isn't really a "behavior change" of MSVC 8.0.

> Can we do something about it?

Do you have a suggestion? #pragma warning(disable: 4345)?

Kind regards,

--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center 

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