Subject: [Boost-bugs] [Boost C++ Libraries] #1459: value_initialized leaves data uninitialized, when using Borland
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-17 23:19:07
#1459: value_initialized leaves data uninitialized, when using Borland
------------------------------+---------------------------------------------
Reporter: niels_dekker | Owner: niels_dekker
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.34.1 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
The data of an instance of boost::value_initialized<T> may not be
initialized properly, when using Borland C++. This is caused by a Borland
specific compiler issue:
[http://qc.codegear.com/wc/qcmain.aspx?d=51854 Value-initialization: POD
struct should be zero-initialized]
For example:
{{{
#include <boost/utility/value_init.hpp>
struct Data { int i; };
...
boost::value_initialized<Data> d;
BOOST_CHECK( get(d).i == 0 ); // Typically fails on Borland!
}}}
Fernando Cacciola and I have already discussed this issue. I hope to have
a workaround within a few weeks... Note that the workaround described by
Ticket #1217 does not yet work for Borland, because of some other Borland
specific issues related to the use of "typename", placement-new, and
explicit destructor calls.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1459>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC