Boost C++ Libraries: Ticket #8851: unused variable warning in opt builds https://svn.boost.org/trac10/ticket/8851 <p> The following snippet from table.hpp:456 fails my opt build with unused variable warnings, treated as errors: </p> <pre class="wiki"> void swap_allocators(table&amp; other, false_type) { // According to 23.2.1.8, if propagate_on_container_swap is // false the behaviour is undefined unless the allocators // are equal. BOOST_ASSERT(node_alloc() == other.node_alloc()); } </pre><p> Seems that BOOST_ASSERT is compiled away in opt builds. Easy fix, patch included. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8851 Trac 1.4.3 alex@… Thu, 18 Jul 2013 17:20:21 GMT attachment set https://svn.boost.org/trac10/ticket/8851 https://svn.boost.org/trac10/ticket/8851 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-unordered-patch.diff</span> </li> </ul> <p> patch that fixes the bug </p> Ticket Daniel James Thu, 08 Aug 2013 20:27:42 GMT <link>https://svn.boost.org/trac10/ticket/8851#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8851#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85244" title="Fix unused variable warning. Refs #8851. Bit annoying that ...">[85244]</a>) Fix unused variable warning. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8851" title="#8851: Bugs: unused variable warning in opt builds (closed: fixed)">#8851</a>. </p> <p> Bit annoying that <code>boost::ignore_unused_variable_warning</code> is in <code>&lt;boost/concept_check.hpp&gt;</code>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sun, 18 Aug 2013 09:44:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8851#comment:2 https://svn.boost.org/trac10/ticket/8851#comment:2 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85388" title="Merge unordered to release. Fixes #8851, #8874 Avoid some warnings, ...">[85388]</a>) Merge unordered to release. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8851" title="#8851: Bugs: unused variable warning in opt builds (closed: fixed)">#8851</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8874" title="#8874: Bugs: [unordered] GCC 4.8+ warns about unused local typedef (closed: fixed)">#8874</a> </p> <p> Avoid some warnings, and move detail functions into a sub-namespace to avoid exposing them via. ADL. </p> Ticket