Boost C++ Libraries: Ticket #4213: can't have const value_initialized members https://svn.boost.org/trac10/ticket/4213 <p> Code like: </p> <p> const value_initialized&lt;int&gt; x; </p> <p> Is invalid in clang and comeau, as they correctly (I believe) reject default initialization of const objects without a user-provided default constructor. </p> <p> The attached patch adds a default constructor, along with a copy constructor and operator=, just for consistency. It makes clang++ pass all tests for utility, and does not make g++ fail any. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4213 Trac 1.4.3 Chris Jefferson Thu, 13 May 2010 10:28:27 GMT attachment set https://svn.boost.org/trac10/ticket/4213 https://svn.boost.org/trac10/ticket/4213 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">value_init.hpp.patch</span> </li> </ul> <p> Patch to value_init.hpp </p> Ticket niels_dekker Thu, 13 May 2010 14:20:46 GMT version, component changed; owner set https://svn.boost.org/trac10/ticket/4213#comment:1 https://svn.boost.org/trac10/ticket/4213#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">No-Maintainer</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost Release Branch</span> → <span class="trac-field-new">Boost Development Trunk</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">utility</span> </li> </ul> <p> The regression failures were caused by my commit <a class="changeset" href="https://svn.boost.org/trac10/changeset/61883" title="Added boost::initialized&lt;T&gt; as was agreed at ...">[61883]</a>, which reimplemented value_initialized&lt;T&gt; in terms of initialized&lt;T&gt;. See also: [boost] Patch to value_initialized, May 13, 2010. </p> Ticket niels_dekker Thu, 13 May 2010 14:36:08 GMT <link>https://svn.boost.org/trac10/ticket/4213#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4213#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/61947" title="Hopefully fixed value_initialized compile errors on clang and comeau ...">[61947]</a>) Hopefully fixed value_initialized compile errors on clang and comeau (strict mode) reported by Christopher Jefferson, see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4213" title="#4213: Patches: can't have const value_initialized members (closed: fixed)">#4213</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>niels_dekker</dc:creator> <pubDate>Fri, 14 May 2010 07:27:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4213#comment:3 https://svn.boost.org/trac10/ticket/4213#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> While yesterday, the test output of value_init_test had compile errors for clang-darwin-2.0 (<em>error: default initialization of an object of const type 'boost::value_initialized&lt;int&gt; const' requires a user-provided default constructor</em>), this morning the errors are gone. (Looking at <a href="http://www.boost.org/development/tests/trunk/developer/utility_.html">http://www.boost.org/development/tests/trunk/developer/utility_.html</a>) So <a class="changeset" href="https://svn.boost.org/trac10/changeset/61947" title="Hopefully fixed value_initialized compile errors on clang and comeau ...">[61947]</a> resolved the issue. Thanks, Chris! </p> Ticket