Boost C++ Libraries: Ticket #1459: value_initialized leaves data uninitialized, when using Borland https://svn.boost.org/trac10/ticket/1459 <p> The data of an instance of boost::value_initialized&lt;T&gt; may not be initialized properly, when using Borland C++. This is caused by a Borland specific compiler issue: <a class="ext-link" href="http://qc.codegear.com/wc/qcmain.aspx?d=51854"><span class="icon">​</span>Value-initialization: POD struct should be zero-initialized</a> </p> <p> For example: </p> <pre class="wiki">#include &lt;boost/utility/value_init.hpp&gt; struct Data { int i; }; ... boost::value_initialized&lt;Data&gt; d; BOOST_CHECK( get(d).i == 0 ); // Typically fails on Borland! </pre><p> 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 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1217" title="#1217: Bugs: value_initialized leaves data uninitialized, when using MSVC (closed: fixed)">#1217</a> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1459 Trac 1.4.3 niels_dekker Sun, 18 Nov 2007 13:39:23 GMT <link>https://svn.boost.org/trac10/ticket/1459#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1459#comment:1</guid> <description> <p> BTW, this particular <a class="ext-link" href="http://qc.codegear.com/wc/qcmain.aspx?d=51854"><span class="icon">​</span>Borland issue</a> is also the cause of the current failures of value_init_test (version <a class="changeset" href="https://svn.boost.org/trac10/changeset/40089" title="Added value_initialized&lt;T&gt; test, having T as aggregate POD struct. In ...">[40089]</a>) at the <a class="ext-link" href="http://beta.boost.org/development/tests/trunk/developer/utility_.html"><span class="icon">​</span>regression test</a> (for both siliconman and bcbboost). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>niels_dekker</dc:creator> <pubDate>Mon, 10 Dec 2007 10:47:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1459#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1459#comment:2</guid> <description> <p> A workaround is provided at the trunk, with changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/41942" title="value_init.hpp now no longer distinguished between workaround and ...">[41942]</a>. See also the Boost developer mailing list, Re: [utility] value_init workaround fixed [Re: value_init_test failure]. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>niels_dekker</dc:creator> <pubDate>Sun, 06 Jan 2008 09:22:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1459#comment:3 https://svn.boost.org/trac10/ticket/1459#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The workaround is merged from the trunk to the release branch, changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/42501" title="Merged value_init.hpp from trunk [42277] to release branch, thereby ...">[42501]</a>, so the issue should be resolved with the next release of Boost, version 1.35.0. </p> Ticket niels_dekker Sun, 06 Jan 2008 09:29:31 GMT milestone changed https://svn.boost.org/trac10/ticket/1459#comment:4 https://svn.boost.org/trac10/ticket/1459#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> Ticket