Boost C++ Libraries: Ticket #11623: Clang rejects some simple BOOST_TEST() statements https://svn.boost.org/trac10/ticket/11623 <p> Thanks again for the new BOOST_TEST() tool, which looks very useful. </p> <p> Unfortunately, I'm unable to compile the following under <code>clang++</code> (with or without <code>-std=c++11</code>) : </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#define BOOST_TEST_MODULE comp_doub_mod</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/test/included/unit_test.hpp&gt;</span><span class="cp"></span> <span class="n">BOOST_AUTO_TEST_CASE</span><span class="p">(</span> <span class="n">comp_doubs</span> <span class="p">)</span> <span class="p">{</span> <span class="k">const</span> <span class="kt">double</span> <span class="n">num</span> <span class="p">{</span> <span class="mf">1.0</span> <span class="p">};</span> <span class="n">BOOST_TEST</span><span class="p">(</span> <span class="n">num</span> <span class="o">==</span> <span class="mf">1.0</span> <span class="p">);</span> <span class="c1">// BOOST_TEST( 1.0 == num );</span> <span class="p">}</span> </pre></div></div><p> This also fails if I swap to the commented-out BOOST_TEST() line. </p> <p> The core of the error message is: </p> <pre class="wiki">[...]/boost/test/tools/floating_point_comparison.hpp:259:25: error: 'mutable' cannot be applied to references mutable FPT m_tested_rel_diff; ^ </pre><p> I'll attach the full compiler error output. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11623 Trac 1.4.3 Tony Lewis <tonyelewis@…> Mon, 07 Sep 2015 10:08:09 GMT attachment set https://svn.boost.org/trac10/ticket/11623 https://svn.boost.org/trac10/ticket/11623 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">clang_compile_errors.err</span> </li> </ul> <p> clang++ compilation errors </p> Ticket Gennadiy Rozental Mon, 07 Sep 2015 21:14:57 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11623#comment:1 https://svn.boost.org/trac10/ticket/11623#comment:1 <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> thx for the report </p> Ticket Tony Lewis <tonyelewis@…> Mon, 14 Sep 2015 15:08:24 GMT <link>https://svn.boost.org/trac10/ticket/11623#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11623#comment:2</guid> <description> <p> Thanks for the successful fix in the develop branch. Will this make it into 1.60.0? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Mon, 28 Sep 2015 08:39:34 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/11623#comment:3 https://svn.boost.org/trac10/ticket/11623#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Assigning to keep track of the change, will close once in master </p> Ticket Raffi Enficiaud Mon, 28 Sep 2015 08:39:46 GMT owner, status changed https://svn.boost.org/trac10/ticket/11623#comment:4 https://svn.boost.org/trac10/ticket/11623#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket Raffi Enficiaud Mon, 28 Sep 2015 08:46:54 GMT status changed https://svn.boost.org/trac10/ticket/11623#comment:5 https://svn.boost.org/trac10/ticket/11623#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Raffi Enficiaud Tue, 27 Oct 2015 12:50:12 GMT milestone changed https://svn.boost.org/trac10/ticket/11623#comment:6 https://svn.boost.org/trac10/ticket/11623#comment:6 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> Ticket Raffi Enficiaud Mon, 02 Nov 2015 10:08:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11623#comment:7 https://svn.boost.org/trac10/ticket/11623#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> merged to master </p> Ticket