Boost logo

Boost :

From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2007-08-28 13:29:38

The data of the wrapper class boost::value_initialized<T> may not be
initialized properly, when using Microsoft Visual C++. The problem is
caused by two different compiler issues regarding value initialization.
For details, please read the ticket that I submitted yesterday evening

Fernando Cacciola and I developed a new version of value_init.hpp,
offering a workaround. The file is attached to the ticket:

The workaround version stores the bytes of the T object that is wrapped
by value_initialized<T> as an instance of aligned_storage::type. During
the construction of value_initialized<T>, it clears the bytes of T
(using memset), just before constructing T itself, by placement new:

  std::memset(&x, 0, sizeof(x)); new (&x) T();

The workaround is enabled by defining a macro,

As I never contributed to a Boost library before, what should I do in
order to get this workaround reviewed, and hopefully get it into the

Kind regards,

Niels Dekker
Scientific programmer at LKEB, Leiden University Medical Center

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