Boost C++ Libraries: Ticket #11624: BOOST_TEST( 0.0 == 0.0 ) fails under C++11 (GCC and Clang) https://svn.boost.org/trac10/ticket/11624 <p> Thanks again for the new BOOST_TEST() tool, which looks very useful. </p> <p> Unfortunately, I'm seeing strange behaviour from the following code under <code>g++ -std=c++11</code> or <code>clang++ -std=c++11 -stdlib=libc++</code> : </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#define BOOST_TEST_MODULE zero_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">zero</span> <span class="p">)</span> <span class="p">{</span> <span class="n">BOOST_TEST</span><span class="p">(</span> <span class="mf">0.0</span> <span class="o">==</span> <span class="mf">0.0</span> <span class="p">);</span> <span class="p">}</span> </pre></div></div><p> If I compile with <code>-std=c++11</code>, then the test fails: </p> <pre class="wiki">error: in "zero": check 0.0 == 0.0 has failed [0 != 0]. Absolute value exceeds tolerance [|0| &gt; 0] </pre><p> ...but I compile without any <code>-std=[...]</code> option, then the test passes. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11624 Trac 1.4.3 Gennadiy Rozental Mon, 07 Sep 2015 21:16:03 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11624#comment:1 https://svn.boost.org/trac10/ticket/11624#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:15 GMT <link>https://svn.boost.org/trac10/ticket/11624#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11624#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>Wed, 14 Oct 2015 22:12:35 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/11624#comment:3 https://svn.boost.org/trac10/ticket/11624#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> Reopening to keep track of the merge to releases. </p> Ticket Raffi Enficiaud Tue, 27 Oct 2015 12:50:34 GMT milestone changed https://svn.boost.org/trac10/ticket/11624#comment:4 https://svn.boost.org/trac10/ticket/11624#comment:4 <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 Tue, 27 Oct 2015 12:53:28 GMT owner, status changed https://svn.boost.org/trac10/ticket/11624#comment:5 https://svn.boost.org/trac10/ticket/11624#comment:5 <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 Tue, 27 Oct 2015 12:54:37 GMT status changed https://svn.boost.org/trac10/ticket/11624#comment:6 https://svn.boost.org/trac10/ticket/11624#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Raffi Enficiaud Mon, 02 Nov 2015 10:08:47 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11624#comment:7 https://svn.boost.org/trac10/ticket/11624#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